feat: stuffy feature bundle #159

Merged
naomi merged 14 commits from feat/stuffy into main 2026-02-24 20:48:50 -08:00
Owner

Summary

This PR bundles a collection of new features and quality-of-life improvements identified during a Claude CLI 2.1.50 audit.

  • Tab status indicator — Tab stays yellow until the greeting is responded to, then turns green. Fixed disconnect not resetting to grey. Closes #157
  • Auth status display — New "Account" section in settings sidebar showing login status, email, org, API key source, and Hikari override indicator. Includes login/logout buttons. Closes #153
  • CLI version badge — New "Supported" badge showing the highest audited CLI version, colour-coded green/amber/red based on installed vs supported version. Closes #154 (bump to 2.1.50)
  • Rate limit eventsrate_limit_event messages from the stream are now parsed and shown as amber [rate-limit] lines in the terminal instead of being silently dropped. Closes #155
  • "Prompt is too long" handling — Detects this error in assistant messages and shows a Compact Conversation button to send /compact directly. Closes feat: detect and handle "Prompt is too long" errors from Claude CLI (#158)
  • last_assistant_message in Agent Monitor — Extracts the agent's final output from the ToolResult content block in the JSON stream and displays it as a snippet on completed agent cards. Closes #156
  • --worktree flag — New "Worktree isolation" toggle in session settings passes --worktree to Claude Code. Hook events (WorktreeCreate/WorktreeRemove) are displayed as green [worktree] lines. Closes #152, Closes feat: support WorktreeCreate and WorktreeRemove hook events in terminal (#150)
  • ConfigChange hook events[ConfigChange Hook] stderr events are now displayed as cyan [config] lines instead of errors. Closes #151
  • CLAUDE_CODE_DISABLE_1M_CONTEXT toggle — New "Disable 1M context" setting in session configuration injects this env var into the Claude process. Closes #154

Test plan

  • Tab status indicator: start a new session and verify the tab stays yellow until Claude responds to the greeting, then turns green
  • Auth status: open settings and verify the Account section shows correct login info
  • CLI version badge: verify the "Supported 2.1.50" badge shows green when CLI matches
  • Rate limit events: unit tests cover parsing; amber [rate-limit] lines display correctly
  • Compact button: unit tests cover detection; button renders correctly in terminal
  • Agent Monitor: use the Task tool and verify completed agent cards show a message snippet
  • Worktree: enable toggle, start session, verify --worktree flag appears in process args
  • ConfigChange: hook events display as [config] lines rather than errors
  • Disable 1M context: enable toggle, start session, verify CLAUDE_CODE_DISABLE_1M_CONTEXT=1 in /proc/<pid>/environ

This PR was created with help from Hikari~ 🌸

## Summary This PR bundles a collection of new features and quality-of-life improvements identified during a Claude CLI 2.1.50 audit. - **Tab status indicator** — Tab stays yellow until the greeting is responded to, then turns green. Fixed disconnect not resetting to grey. Closes #157 - **Auth status display** — New "Account" section in settings sidebar showing login status, email, org, API key source, and Hikari override indicator. Includes login/logout buttons. Closes #153 - **CLI version badge** — New "Supported" badge showing the highest audited CLI version, colour-coded green/amber/red based on installed vs supported version. Closes #154 (bump to 2.1.50) - **Rate limit events** — `rate_limit_event` messages from the stream are now parsed and shown as amber `[rate-limit]` lines in the terminal instead of being silently dropped. Closes #155 - **"Prompt is too long" handling** — Detects this error in assistant messages and shows a ⚡ Compact Conversation button to send `/compact` directly. Closes #158 - **`last_assistant_message` in Agent Monitor** — Extracts the agent's final output from the `ToolResult` content block in the JSON stream and displays it as a snippet on completed agent cards. Closes #156 - **`--worktree` flag** — New "Worktree isolation" toggle in session settings passes `--worktree` to Claude Code. Hook events (`WorktreeCreate`/`WorktreeRemove`) are displayed as green `[worktree]` lines. Closes #152, Closes #150 - **ConfigChange hook events** — `[ConfigChange Hook]` stderr events are now displayed as cyan `[config]` lines instead of errors. Closes #151 - **`CLAUDE_CODE_DISABLE_1M_CONTEXT` toggle** — New "Disable 1M context" setting in session configuration injects this env var into the Claude process. Closes #154 ## Test plan - [ ] Tab status indicator: start a new session and verify the tab stays yellow until Claude responds to the greeting, then turns green - [ ] Auth status: open settings and verify the Account section shows correct login info - [ ] CLI version badge: verify the "Supported 2.1.50" badge shows green when CLI matches - [ ] Rate limit events: unit tests cover parsing; amber `[rate-limit]` lines display correctly - [ ] Compact button: unit tests cover detection; button renders correctly in terminal - [ ] Agent Monitor: use the Task tool and verify completed agent cards show a message snippet - [ ] Worktree: enable toggle, start session, verify `--worktree` flag appears in process args - [ ] ConfigChange: hook events display as `[config]` lines rather than errors - [ ] Disable 1M context: enable toggle, start session, verify `CLAUDE_CODE_DISABLE_1M_CONTEXT=1` in `/proc/<pid>/environ` ✨ This PR was created with help from Hikari~ 🌸
hikari added 14 commits 2026-02-24 20:10:26 -08:00
Long tool messages (e.g. Bash commands) are now stored in full and
displayed collapsed by default, with a toggle button to expand/collapse.
Removes backend truncation of Bash commands at 50 chars.
Track greeting-pending conversations so the tab stays yellow until
Claude actually responds, rather than going green as soon as the
process starts. Also fixes the disconnect handler missing a status
update that left tabs stuck at yellow after the process died.
Adds a second badge alongside the existing CLI version display showing
the highest audited version (currently 2.1.33). The badge is
colour-coded: green when installed matches supported, amber when ahead,
red when behind, and neutral grey whilst loading.
The installed version string includes a suffix like '(Claude Code)'
which caused Number() to parse the third segment as NaN, making the
comparison always return 0 (current) instead of the correct result.
Now extracts the semver portion with a regex before comparing.
Strips the '(Claude Code)' suffix from the installed version badge so
it shows cleanly as 'CLI 2.1.50'. Also adds an italic warning message
after the supported badge when versions differ: amber text for newer
installs, red text for outdated installs.
Implements issue #153. Adds Account section to ConfigSidebar with:
- Claude auth status (logged in/out, email, org, plan, API source)
- API key override indicator reading from local Hikari config
- Login/logout action buttons
- Refresh button for manual status updates

Adds Rust commands: get_auth_status, auth_login, auth_logout
Closes #155

- Add RateLimitInfo struct and RateLimitEvent variant to ClaudeMessage
- Emit rate-limit OutputEvent with human-readable message in wsl_bridge
- Add rate-limit line type to TerminalLine union and Terminal rendering
- Display rate-limit lines in amber with [rate-limit] prefix
- Add Terminal.test.ts with 28 tests for getLineClass, getLinePrefix,
  formatTime, isToolContentLong, and truncateToolContent
Closes #158

- Detect "Prompt is too long" in assistant text blocks in wsl_bridge
- Emit error line type instead of assistant for better visibility
- Emit compact-prompt event after the error line
- Render a compact-prompt line as an action button in the terminal
- Clicking the button sends /compact to the active session
- Add getLineClass/getLinePrefix tests for compact-prompt type
Closes #152, closes #150

- Add use_worktree bool to ClaudeStartOptions and HikariConfig (Rust + TS)
- Pass --worktree flag to claude in both WSL and non-WSL command paths
- Detect WorktreeCreate/WorktreeRemove hook events in stderr handler
- Emit worktree events with distinct line_type instead of error
- Add worktree line type to TerminalLine union, Terminal rendering, and tests
- Display worktree events in green with [worktree] prefix
- Add worktree isolation toggle to Agent Settings section of ConfigSidebar
- Thread use_worktree through all seven start_claude call sites
Detects [ConfigChange Hook] lines in stderr and emits them as
config-change line type with [config] prefix in purple.

Closes #151
Extracts last_assistant_message from SubagentStop hook events and
surfaces it in the agent monitor panel as a summary snippet below
each completed agent card.

Closes #156
Previously the feature relied on SubagentStop hook events via stderr,
but Claude Code writes nothing to stderr. Instead, extract the agent's
final output from the ToolResult content block in the stdout JSON stream,
which contains the actual task result text. Handles both plain string
and array-of-content-block formats.
Adds a new config option to expose the CLAUDE_CODE_DISABLE_1M_CONTEXT
environment variable through the settings sidebar, allowing users to
opt out of the extended 1M context window without manually setting
environment variables.

Closes #154
chore: bump supported CLI version to 2.1.50
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 59s
CI / Lint & Test (pull_request) Successful in 16m10s
CI / Build Linux (pull_request) Successful in 20m2s
CI / Build Windows (cross-compile) (pull_request) Successful in 30m29s
b5c67cb4df
naomi merged commit a4e6788573 into main 2026-02-24 20:48:50 -08:00
naomi deleted branch feat/stuffy 2026-02-24 20:48:51 -08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#159