Skip to content

Conversation

@anotherjesse
Copy link
Contributor

No description provided.

Comment on lines -61 to +62
await charmManager.add([cell]);
log(charmManager, "charmmanager after adding cell");
// await charmManager.add([cell]);
// log(charmManager, "charmmanager after adding cell");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is half-way written code by @ellyxir - I asked her if I can just comment out - she said yep

},
});

failed = !await t.step({
Copy link
Contributor

@bfollington bfollington Mar 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the idiomatic way to use Deno.test? I've never seen !await in my life!

Why did we have to move away from BDD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might not need to now - I was getting BDD hard killing after a minute .. I think

I'll try to switch back

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While making deno-web-test, discovered that e.g. @std/testing/bdd is implemented via Deno.test((t) => {}), where the nested BDD scopes are "steps" inside Deno.test

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That being said, I don't see the benefit of handrolling that

Comment on lines 48 to 52
export const login = async (page: Page) => {
export const login = async (page: Page, additionalWaitTime: number) => {
// Wait a second :(
// See if #user-avatar is rendered
// Check if we're already logged in
await sleep(1000);
await sleep(1000 + additionalWaitTime);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needed?

const ir = getIframeRecipe(charm);
iframeRecipe = ir?.iframe ?? null;
} catch (e) {
console.info(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think console.warn('Failed to find iframe recipe' e); would be more appropriate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was debating this - as this most likely means it isn't an iframe charm. I think I should have a way to check "is iframe" first - and then if getting the recipe fails then explode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving this for now - happy to change in next round

if (!fixedCode) {
throw new Error("Could not extract fixed code from LLM response");
}
))!;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a trap to ! this, what if it fails?

Comment on lines -58 to -66
console.group("Extending Charm");
console.log("Performing extension");
console.log("Focused Charm ID", focusedCharmId);
console.log("Focused Replica ID", focusedReplicaId);
console.log("Input", input);
console.log("Variants", variants);
console.log("Preferred Model", preferredModel);
const charm = await charmManager.get(focusedCharmId);
console.log("CHARM", charm);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this have to go? It's very useful and it's in a console group already

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll re-add - I thought it was just claude

Comment on lines 267 to 278
generateNewRecipeVersion(
charmManager,
charm,
workingSrc,
iframeRecipe.spec,
).then((newCharm) => {
console.log("Fixme, navigate to new charm", newCharm);
// navigate(createPath("charmShow", {
// charmId: charmId(newCharm)!,
// replicaName: replicaName,
// }));
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should finish this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is the ticket around finishing code editting which is what I want to get to next

Comment on lines +379 to 380
// NOTE(ja): this doesn't sync recipe to storage
if (recipeId) await storage.syncCellById(this.space, { "/": recipeId });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it do...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it just creates a cell ... with nothing in it

Comment on lines 366 to +367
// FIXME(JA): this really really really needs to be revisited
async syncRecipe(charm: Cell<Charm>): Promise<string | undefined> {
async syncRecipe(charm: Cell<Charm>): Promise<string> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you say more about the future improvements we need here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should clarify what recipes go where - since right now we are throwing everything at blobby. should we rely on blobby for anything more than "spellbook/sharing"

how does that impact spellcasting? maybe everything should go?

would love to whiteboard about this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this file, thanks for the sanity pass.

@anotherjesse anotherjesse merged commit 9c633a0 into main Mar 12, 2025
5 checks passed
@anotherjesse anotherjesse deleted the charm-cleanup branch March 12, 2025 18:31
@sentry
Copy link

sentry bot commented Mar 25, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: Could not find IFRAME-V0 recipe content in source /:replicaName/:charmId/detail View Issue
  • ‼️ Error: Compilation errors in recipe /:replicaName View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants