Add Up/Down replay for user input history#4349
Conversation
f7b9ca1 to
aa08682
Compare
2725797 to
2c82301
Compare
SivanCola
left a comment
There was a problem hiding this comment.
Thanks, this is directionally right. The backend-backed lazy tape is a better fit for #4348 than a frontend-only history buffer, and it also looks like the more complete path compared with the overlapping #3648.
Before merging, please rebase on the latest main-v2 and resolve the current conflicts:
desktop/frontend/package.jsonneeds to preserve both the existing font/typography tests frommain-v2and the new composer history/keyboard tests from this PR.desktop/frontend/src/components/Composer.tsxneeds to be resolved against the latest composer changes.
I did not find a provider-prefix/cache risk in this PR: the new code reads persisted session logs for UI replay and does not change provider request serialization, system prompts, or tool schemas.
Once this is addressed and CI stays green, I will consider merging it into main-v2.
Verified on the current PR head before rebase:
go test ./...passedgo test ./...in the desktop module passedpnpm --dir desktop/frontend testpassedgit diff --checkpassed
Closes esengine#4348 Co-authored-by: PsjJourney <14682492+PsjJourney@users.noreply.github.com> Co-authored-by: SivanCola <32437197+SivanCola@users.noreply.github.com>
2c82301 to
bc76bea
Compare
SivanCola
left a comment
There was a problem hiding this comment.
Approved. I rebased the PR onto the latest main-v2, resolved the composer/package conflicts, and pushed the fix as bc76beab.
What changed after the previous review:
desktop/frontend/package.jsonnow preserves the existing font/typography tests frommain-v2and adds the new composer history/keyboard tests.desktop/frontend/src/components/Composer.tsxis resolved against the latest composer code while keeping the prompt-history navigation behavior.- The commit metadata now uses GitHub noreply identities and credits @PsjJourney for the earlier #3648 composer Up/Down history UX exploration.
- The PR body now documents #3648's contribution points and authorship note.
Verified:
go test ./...passedgo test ./...in the desktop module passedpnpm --dir desktop/frontend testpassedgit diff --checkpassed
|
Just a historical note: the core design of this feature — cursor-based lazy JSONL tape, nonce+cache invalidation, cross-session ordering — was first implemented in PR #2068 (TypeScript, merged into I don"t need any attribution changes — just wanted to leave a reference for anyone tracing the history of this feature later. |
Summary
Closes #4348
Related contribution
Thanks @PsjJourney for #3648. That PR helped define the desktop composer UX for this feature:
This PR carries that UX direction forward with a backend-backed lazy session tape, persisted user-visible prompt text, active-session-first traversal, cross-session ordering, and broader regression coverage.
Authorship note: @ferstar is the primary author of this PR. @PsjJourney contributed the earlier composer Up/Down history UX exploration in #3648. @SivanCola contributed the rebase/conflict resolution, contributor attribution, and final verification.
Verification
go test ./...go test ./...in the desktop modulepnpm --dir desktop/frontend testgit diff --check