Skip to content

[diffs] Refactor Edit Persistance - #1092

Draft
amadeus wants to merge 8 commits into
amadeus/edit-complete-handlerfrom
amadeus/remove-editor-persistance
Draft

[diffs] Refactor Edit Persistance#1092
amadeus wants to merge 8 commits into
amadeus/edit-complete-handlerfrom
amadeus/remove-editor-persistance

Conversation

@amadeus

@amadeus amadeus commented Aug 24, 2026

Copy link
Copy Markdown
Member

WIP

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierre-diffshub Ready Ready Preview Aug 25, 2026 12:15am
pierre-docs-diffs Ready Ready Preview Aug 25, 2026 12:15am
pierre-docs-trees Ready Ready Preview Aug 25, 2026 12:15am
pierrejs-diff-demo Ready Ready Preview Aug 25, 2026 12:15am

Request Review

@blacksmith-sh

blacksmith-sh Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Found 26 test failures on Blacksmith runners:

Failures

Test View Logs
[chromium] › test/e2e/
theme.pw.ts:103:3 › theme switching › toggling the theme changes the rendered token col
ors
View Logs
[chromium] › test/e2e/
theme.pw.ts:114:3 › theme switching › a text selection is preserved across a theme swit
ch
View Logs
[chromium] › test/e2e/
theme.pw.ts:148:5 › theme line highlights › dark-plus keeps active and selected line st
ates distinct
View Logs
[chromium] › test/e2e/
theme.pw.ts:148:5 › theme line highlights › github-dark keeps active and selected line
states distinct
View Logs
[chromium] › test/e2e/
theme.pw.ts:148:5 › theme line highlights › github-light keeps active and selected line
states distinct
View Logs
[chromium] › test/e2e/
theme.pw.ts:148:5 › theme line highlights › min-dark keeps active and selected line sta
tes distinct
View Logs
[chromium] › test/e2e/
theme.pw.ts:148:5 › theme line highlights › nord keeps active and selected line states
distinct
View Logs
[chromium] › test/e2e/
theme.pw.ts:148:5 › theme line highlights › pierre-dark keeps active and selected line
states distinct
View Logs
[chromium] › test/e2e/
theme.pw.ts:148:5 › theme line highlights › pierre-light keeps active and selected line
states distinct
View Logs
[chromium] › test/e2e/
theme.pw.ts:164:3 › theme line highlights › selection, active, and hover resolve as ord
ered color tiers
View Logs

...and 16 more test failures. View all on Blacksmith

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

* in memory so a later editor using the same kind and key can resume them.
*/
constructor(
documentKind: EditorDocumentKind,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe introduce DiffsEditor and FileEditor instead of argument?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's a possibility, but felt like that was yet another large refactor that would happen on top of an already large refactor heh, so figured this was simpler and matched what we do in other places with like InteractionManager

This cleans up a ton of internal code around session persistance.

Also fixed a bug with collapsed state resetting undo state when it
shouldn't
Still some rough edged to be worked out in the next couple phases.
This is a lot, and I had to fight my way through a bunch of different
things, but I think we also fixed a bunch of bad bugs alogn the way.

We've now hooked up documentKey retention.
This turned out to be a bit bigger than I originally thought because
there was a bunch of bullshit that wasn't properly accounted for and the
AI did definitely do some slop.

Anyways, I think we've landed somewhere that's really good, the default
persistance works really nicely now with the homepage stuff, and doesn't
require any hacky bullshit
Also hook it up in the agent ui
About to be rewritten
Getting the plumbing in place for the new API
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.

2 participants