Skip to content

Keep Ranger text selection and show model reasoning - #456

Merged
powerfooI merged 2 commits into
mainfrom
polish-ranger-ux
Oct 19, 2026
Merged

powerfooI merged 2 commits into
mainfrom
polish-ranger-ux

Conversation

@powerfooI

Copy link
Copy Markdown
Owner

Summary

  • Text selection: terminal output no longer refocuses xterm while text is selected or being selected in Ranger or another overlay, so replies stay selectable while agents stream. Activating a pane still focuses its terminal, and Escape clears a panel selection before it closes Ranger.
  • Model reasoning: replies show a collapsible Thinking section, one step per model call that shared reasoning. It is open and follows the stream while the model reasons, then collapses when the answer starts. Redacted reasoning is omitted. Reasoning is capped at 16,000 characters per reply, keeping the newest steps with an "Earlier reasoning truncated" note, and is removed from older turns before chat history is dropped. Task runs show it too.
  • Panel polish: the model picker sizes to the model name, the run status reads as a status with a colored dot instead of a third tab, the chat subtitle shows the model label instead of its ID, and list_ranger_tasks / send_user_notification get readable labels.

Snapshots gain optional thinking, thinking_skipped and thinking_truncated fields on assistant messages; older clients ignore them.

Verification

bun run typecheck:bun
bun run lint
bun run build:web
bun test shared/assistant.test.ts server/src/assistant/service.test.ts server/src/assistant/pi-driver.test.ts web/src/components/AssistantThinking.test.tsx web/src/components/AssistantPanel.test.ts web/src/components/AssistantTasks.test.ts web/src/terminalFocus.test.ts web/src/components/TerminalView.inputMode.test.ts
bun run test:quick

test:quick timed out two isolated-runtime DOM tests on a loaded machine (AssistantPanel.test.ts, TerminalView.inputMode.test.ts); both pass when run alone. The panel was checked manually against a dev bridge for the selector layout, status indicator, model label and tool labels. Reasoning display with a live model has not been checked manually.

🤖 Generated with Claude Code

Terminal output no longer refocuses xterm while text is selected or being
selected in Ranger or another overlay, so replies can be selected while
agents stream. Activating a pane still reclaims focus, and Escape clears a
panel selection before closing Ranger.

Ranger now shows model reasoning in a collapsible Thinking section, one
step per model call. It stays open while the model reasons, keeps the
newest reasoning within a 16,000 character limit, omits redacted
reasoning, and is shed from older turns before chat history.

Also polish the panel: the model picker sizes to its name, the run status
reads as a status rather than a tab, the chat subtitle shows the model
label, and two tool names get readable labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@powerfooI powerfooI added the enhancement New feature or request label Oct 19, 2026
@powerfooI

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T15:25:08.110397Z 39fffa5 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 39fffa59b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/src/assistant/service.ts
When one code unit of budget remained over an older step ending in an
astral character, the repaired cut was empty but still kept, rendering a
blank step and undercounting skipped steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@powerfooI

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 39fffa59b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@powerfooI
powerfooI merged commit 9dcac5c into main Oct 19, 2026
4 checks passed
@powerfooI
powerfooI deleted the polish-ranger-ux branch October 19, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant