Skip to content

Add a back button to AI history and open it directly from /history - #320

Merged
huacnlee merged 1 commit into
mainfrom
history-command-opens-immediately
Oct 1, 2026
Merged

huacnlee merged 1 commit into
mainfrom
history-command-opens-immediately

Conversation

@huacnlee

@huacnlee huacnlee commented Oct 1, 2026

Copy link
Copy Markdown
Owner

What changes

  • /history opens at once: choosing /history from the slash-command suggestions with Up/Down and Return/Enter now opens the history list directly. Before, the first Enter only completed the text to /history and a second Enter was needed. /history takes no argument, so the completion step added nothing. Partial /clear and /diagnose completion is unchanged.
  • Back to chat from History: the history view shows a ← Chat control in the AI header, using the same BackBar as the reader and calendar detail pages, and the header reads AI · History. Before, Escape was the only way back. The button and Escape both go through AgentPrompt.leaveHistory(), which returns focus to the prompt field.
  • The history list now sits below the measured header instead of a fixed 28px offset, so the taller back button cannot overlap the first row.

docs/KEYS.md records the /history behavior.

Before / after

Synthetic offscreen captures of the production AgentPrompt in the tst_agent_interaction harness, using the same 520×600 size, harness colors, software renderer and scale 1 for both. Baseline: main at 31a5bb1. The only visible differences are the ← Chat button and the AI · History title; the list moves down to clear the button.

Screenshot to be attached.

Verification

  • New test_history_back_returns_to_chat: the back button is hidden in chat, shown in History, sits above the list, and clicking it leaves History and focuses the prompt field.
  • test_exact_commands_execute_and_partial_commands_complete now asserts that choosing /history enters History with an empty field and no agent call.
  • make test-qml on this branch: 1158 + 6 + 64 passed, 0 failed. make qml-check exits 0.

Security: PASS. This change is presentation only. It adds no backend request, network request or agent dispatch; the existing test asserts that /history makes no agent call.

Release Notes

  • Choosing /history in the AI panel opens conversation history immediately.
  • AI conversation history has a back button to return to the chat.

🤖 Generated with Claude Code

Choosing /history from the command suggestions now opens the history list
at once instead of completing the text for a second Enter, since the
command takes no argument. The history view shows a Back to chat control
in the AI header, sharing leaveHistory() with Escape, and the list sits
below the header instead of a fixed 28px offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@huacnlee
huacnlee merged commit a3b7616 into main Oct 1, 2026
14 checks passed
@huacnlee
huacnlee deleted the history-command-opens-immediately branch October 1, 2026 07:36
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.

1 participant