feat: add Agent prompt history navigation - #784
Conversation
|
Manual QA was successful. Agent Mode allows Arrow Up and Arrow Down to navigate prompt history. Chat Mode does not allow prompt-history navigation, confirming it remains unchanged. |
Code review reportOne issue is worth fixing before merge: P2 — routine run completion exits active prompt-history navigation
The composer remains enabled while a run is active, so this sequence is possible:
This violates the requirement that live assistant/tool events not change the selected history entry. The narrow fix is to preserve navigation during routine run-finish reconciliation. True Advisory only — not necessary to fixThe keydown handler already returns during IME composition, while the pure history helper also checks Validation
|
Deploying maple with
|
| Latest commit: |
10feca6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d86ff89.maple-ca8.pages.dev |
| Branch Preview URL: | https://codex-maple-prompt-history-m.maple-ca8.pages.dev |
|
Addressed in commit I agree with the P2 finding. A routine I kept the defensive IME check unchanged, as recommended. I intentionally did not add a synthetic run-finish policy hook solely for a test: the existing pure snapshot test cannot catch this component-side reset, while threading prompt-history-specific policy through the thought-run helper would couple unrelated layers. The production fix remains the narrow semantic change. Validation:
|
Final manual QA after code reviewManual QA passed on the post-review desktop build:
Result: Passed. |
QA UI Automation Report — PASSPR: #784 — feat: add Agent prompt history navigation Environment and build verification
UI results
Critical run-completion regression testThis specifically exercised the behavior fixed by 75e2723:
Result: PASS. Routine assistant streaming and run completion did not disturb or shift the active history snapshot. Chat negative controlsTested both Chat composer placements:
Result: PASS — history behavior is Agent-only as intended. Focused automated validationAll commands ran in Maple's pinned .#ci Nix environment: nix develop .#ci -c bash -lc 'cd frontend && bun --no-env-file test ./src/components/agent/agentPromptHistory.test.ts'
nix develop .#ci -c bash -lc 'cd frontend && bun --no-env-file test ./src/components/AgentMode.test.ts'
nix develop .#ci -c bash -lc 'cd frontend && bun --no-env-file test ./src/components/chatComposerListContinuation.test.ts'Results:
These focused suites complement the rendered desktop testing; the pure helper tests alone do not prove the component-side run-completion behavior, which is why that boundary was also exercised directly in the live UI. Side effects and cleanup state
Not manually exercised
Within the requested desktop Agent-versus-Chat scope, the PR behaves as specified and the high-risk run-completion regression is resolved. |
|
Already rebased on latest master. Ready for review. |
Review notesTwo items from a local review of
|
AnthonyRonning
left a comment
There was a problem hiding this comment.
The other two comments are likely small and not blocking but I ran through QA myself and history navigation doesn't seem to work in a not-new chat unless you click into the box again. You can type into that box immediately after sending the previous message, but the arrow navigation doesn't work unless you click into that box again.
This may or may not be an existing issue that never surfaced until this. The sus behavior is that the orange cursor remains in the text box after hitting enter to send. But the text box does not have an active orange border like it usually does when it is selected for text.
|
Working on these code review fixes. And yes I see the focus thing you're talking about. It pre-dates this PR but should be fixed, I'll do it here. |
|
Addressed Anthony’s three review findings in commit
Chat Mode remains untouched. Validation on
|
AnthonyRonning
left a comment
There was a problem hiding this comment.
Works really well and code is great! Merge whenever.
Summary
Why
Agent users often reuse an earlier instruction with small edits. The prompts already exist in the account- and task-scoped Agent timeline, but the composer had no navigation state for recalling them.
Validation
nix develop .#ci -c ./scripts/ci/frontend.sh— passed formatting, TypeScript, and all 666 tests; ESLint completed with 0 errors and 13 existing warnings.Closes #782