Skip to content

feat(webui): add chat terminal shortcut preference - #5824

Merged
think-in-universe merged 7 commits into
mainfrom
issue-5705-hide-terminal-icon
Jul 9, 2026
Merged

think-in-universe merged 7 commits into
mainfrom
issue-5705-hide-terminal-icon

Conversation

@italic-jinxin

@italic-jinxin italic-jinxin commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Settings → Appearance tab for browser-local interface preferences.
  • Persists a “Show chat terminal shortcut” preference, defaulting to visible for existing users.
  • Gates the chat floating terminal/logs shortcut on that preference while preserving direct logs access.
  • Adds unit and caller-level tests for preference storage, settings UI, route exposure, and chat hiding behavior.
image

Linked Issue

Closes #5705

Validation

  • git diff --check
  • node --check for changed WebUI JS files
  • node --test ... for related WebUI tests

Security Impact

No. Frontend-only local UI preference; no auth, route, API, or permission behavior changes.

Database Impact

No schema or migration changes.

Blast Radius

Limited to Reborn WebUI v2 static frontend settings/chat UI.

Rollback Plan

Revert this PR to return the floating chat terminal/logs shortcut to the prior always-visible behavior.


Review track: A

@italic-jinxin italic-jinxin added size: L 200-499 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Jul 8, 2026
@ironloopai

ironloopai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

🔎 IronLoop Review Status

Head: f8020a240d866d79926764508829bf8b2ea19f54
Result: No reviewer jobs are scheduled yet.
Next: Run @ironloopai review to start reviewers.
Updated: 2026-07-09T03:22:50.472Z

Current reviewers:

Reviewer State Verdict Findings Last update
none Queued N/A No reviewer jobs scheduled yet. N/A
Reviewer summaries
Reviewer Detail
none No reviewer jobs scheduled yet.
Recent activity
Time Reviewer State Detail
N/A N/A Waiting No progress events recorded yet.
Available commands
  • @ironloopai help
  • @ironloopai agents
  • @ironloopai review
  • @ironloopai review --agent <agent-id-or-alias>
  • @ironloopai status
Run metadata

Admission: webhook accepted the request and IronLoop persisted review state before this projection.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5824 July 8, 2026 11:39 Destroyed
@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a new Appearance section in Settings.
    • Added a user preference to show or hide the chat thread logs shortcut.
    • Synced this preference across browser tabs.
  • Localization

    • Added the new settings labels and descriptions across multiple languages.
  • Bug Fixes

    • Chat threads now respect the visibility setting for the logs shortcut.

Walkthrough

Adds a browser-local "Appearance" settings tab with a toggle controlling whether the floating chat terminal/logs shortcut is shown. Introduces interface-preferences.ts (localStorage-backed read/write + React hook), wires it into Chat to gate logsPath, registers the new settings route/tab, and adds i18n strings across all locale files.

Changes

Chat terminal shortcut toggle

Layer / File(s) Summary
Interface preferences storage and hook
crates/ironclaw_webui_v2/frontend/src/lib/interface-preferences.ts, crates/ironclaw_webui_v2/frontend/src/lib/interface-preferences.test.ts
Adds readShowChatLogsShortcut/writeShowChatLogsShortcut localStorage helpers and useInterfacePreferences hook with cross-tab "storage" event sync, plus unit tests.
Settings routing and schema wiring
crates/ironclaw_webui_v2/frontend/src/app/routes.ts, crates/ironclaw_webui_v2/frontend/src/app/routes.test.ts, crates/ironclaw_webui_v2/frontend/src/pages/settings/lib/settings-schema.ts
Registers a new appearance entry in SETTINGS_SUB_ROUTES and SETTINGS_TABS, with a test asserting reachability.
Chat logsPath gating
crates/ironclaw_webui_v2/frontend/src/pages/chat/chat.tsx, crates/ironclaw_webui_v2/frontend/src/pages/chat/lib/chat.test.ts
Chat reads showChatLogsShortcut via useInterfacePreferences and only computes a scoped logsPath when both an active thread exists and the preference is enabled; tests updated to cover both states.
Localized appearance and shortcut strings
crates/ironclaw_webui_v2/frontend/src/i18n/{ar,de,en,es,fr,hi,ja,ko,pt-BR,uk,zh-CN}.ts
Adds settings.appearance and settings.field.showChatTerminalShortcut/Desc translation keys across all supported locales.

Estimated code review effort: 2 (Simple) | ~12 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Chat
  participant useInterfacePreferences
  participant localStorage
  participant MessageList
  User->>Chat: opens chat thread
  Chat->>useInterfacePreferences: read showChatLogsShortcut
  useInterfacePreferences->>localStorage: readShowChatLogsShortcut()
  localStorage-->>useInterfacePreferences: stored value or default true
  useInterfacePreferences-->>Chat: showChatLogsShortcut
  Chat->>Chat: compute logsPath (null unless activeThreadId && showChatLogsShortcut)
  Chat->>MessageList: render with logsPath
  User->>Chat: toggles Appearance setting
  Chat->>useInterfacePreferences: setShowChatLogsShortcut(false)
  useInterfacePreferences->>localStorage: writeShowChatLogsShortcut(false)
  useInterfacePreferences-->>Chat: updated state
  Chat->>MessageList: re-render with logsPath = null
Loading

Possibly related PRs

  • nearai/ironclaw#5491: Both PRs modify the thread-scoped logsPath used to drive the floating chat logs shortcut, with this PR adding useInterfacePreferences gating on top.
  • nearai/ironclaw#5589: Both PRs touch the floating chat terminal/logs shortcut rendering path via logsPath.
  • nearai/ironclaw#5682: Both PRs affect visibility behavior of the floating thread logs shortcut based on logsPath.

Suggested reviewers: serrrfirat

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses Conventional Commits style and accurately summarizes the chat terminal shortcut preference change.
Description check ✅ Passed The description covers summary, linked issue, validation, impact, rollback, and track; only optional checklist sections are left blank.
Linked Issues check ✅ Passed The changes add the settings toggle, persist the preference, and gate the chat shortcut, satisfying #5705.
Out of Scope Changes check ✅ Passed The added routes, i18n, preference module, and tests all support the chat terminal shortcut setting and stay in scope.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new 'Appearance' settings tab to the web UI, allowing users to toggle the visibility of the floating chat terminal/logs shortcut. This preference is stored locally in the browser's localStorage and synchronized across tabs using a custom React hook. The changes include the new settings tab component, preference management utilities, updated routing, localization strings, and comprehensive unit tests. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@ironloopai ironloopai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ IronLoop Review: reviewer

Review at a glance

Verdict Blocking Notes Head
✅ Approved 0 0 385d2269f821

Head: 385d2269f8212fd39417cb02d6a7488d8d240903
Next: No reviewer action needed.

Run details

Status: Current
Needs human: no
Needs validation: no

**Inline candidates:** 0

Summary

Approved. I did not find a concrete regression in the changed WebUI v2 appearance preference paths.

Findings

None.

Developer follow-up

After fixing this feedback:

  1. Push the fix to this PR branch.
  2. Re-run this reviewer with @ironloopai review --agent reviewer if you only changed this reviewer's findings.
  3. Re-run all reviewers with @ironloopai review when the fix may affect multiple areas.
  4. Use @ironloopai status to check queued/running/completed/stale/stalled state while reviewers run.

@italic-jinxin italic-jinxin self-assigned this Jul 8, 2026
@railway-app

railway-app Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the ironclaw-pr-5824 environment in ironclaw-ci-preview

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 9, 2026 at 3:32 am

…nal-icon

# Conflicts:
#	crates/ironclaw_webui_v2/frontend/src/lib/interface-preferences.js
#	crates/ironclaw_webui_v2/frontend/src/lib/interface-preferences.test.mjs
#	crates/ironclaw_webui_v2/frontend/src/pages/settings/components/appearance-tab.js
#	crates/ironclaw_webui_v2/frontend/src/pages/settings/components/appearance-tab.test.mjs
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5824 July 8, 2026 12:52 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5824 July 8, 2026 12:55 Destroyed
@italic-jinxin
italic-jinxin marked this pull request as ready for review July 8, 2026 13:04
@italic-jinxin

Copy link
Copy Markdown
Contributor Author

@claude review

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5824 July 8, 2026 13:04 Destroyed
@claude

This comment was marked as resolved.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5824 July 8, 2026 13:07 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5824 July 8, 2026 13:11 Destroyed
@github-actions

github-actions Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Coverage ratchet

Ratchet mode: ENFORCING

RATCHET PASS: global
  observed: 85.17% (282584 / 331797 lines)
  floor:    85.3% (tolerance 0.5pp -> effective floor 84.8%)
  denominator: 331797 lines now vs 320188 at floor capture (+11609 lines, +3.63%) — not a material change

⚠️ 3 Reborn crate(s) have 0 int-tier coverage (target: 0) — ironclaw_prompt_envelope, ironclaw_scripts, ironclaw_skill_learning

Reborn integration-tier coverage

Line coverage (Reborn crates): 85.17% — 282584 / 331797 lines

Per-crate breakdown (65 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 347
ironclaw_skill_learning 0% 0 / 61
ironclaw_wasm_sandbox_core 7.37% 7 / 95
ironclaw_runtime_policy 33.2% 80 / 241
ironclaw_event_projections 43.34% 673 / 1553
ironclaw_run_state 52.36% 222 / 424
ironclaw_authorization 53.54% 461 / 861
ironclaw_triggers 59.79% 1740 / 2910
ironclaw_observability 61.54% 16 / 26
ironclaw_webui_v2 63.04% 2555 / 4053
ironclaw_mcp 63.15% 581 / 920
ironclaw_reborn_cli 63.41% 3816 / 6018
ironclaw_reborn_migration 67.01% 1172 / 1749
ironclaw_memory 67.12% 747 / 1113
ironclaw_dispatcher 67.15% 92 / 137
ironclaw_filesystem 67.44% 3815 / 5657
ironclaw_trust 72.88% 661 / 907
ironclaw_capabilities 74.08% 1658 / 2238
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_reborn_event_store 74.61% 958 / 1284
ironclaw_extractors 74.72% 538 / 720
ironclaw_first_party_extensions 77.62% 5411 / 6971
ironclaw_llm 77.88% 19479 / 25013
ironclaw_product_context 78.57% 11 / 14
ironclaw_wasm_product_adapters 80.58% 1510 / 1874
ironclaw_process_sandbox 80.65% 671 / 832
ironclaw_reborn_openai_compat 80.95% 956 / 1181
ironclaw_memory_native 81.86% 3226 / 3941
ironclaw_wasm 82.54% 950 / 1151
ironclaw_secrets 82.7% 2791 / 3375
ironclaw_events 83.47% 1762 / 2111
ironclaw_processes 84.06% 965 / 1148
ironclaw_turns 84.24% 13099 / 15549
ironclaw_host_api 85.17% 2549 / 2993
ironclaw_product_workflow 85.84% 10748 / 12521
ironclaw_projects 85.92% 659 / 767
ironclaw_network 86.12% 670 / 778
ironclaw_common 86.46% 1514 / 1751
ironclaw_threads 86.62% 4132 / 4770
ironclaw_slack_v2_adapter 86.79% 1806 / 2081
ironclaw_auth 86.94% 2995 / 3445
ironclaw_reborn_config 86.98% 1730 / 1989
ironclaw_reborn_identity 87.03% 557 / 640
ironclaw_product_adapters 87.29% 3207 / 3674
ironclaw_skills 87.37% 4337 / 4964
ironclaw_hooks 87.84% 9916 / 11289
ironclaw_product_adapter_registry 87.96% 526 / 598
ironclaw_reborn_traces 88.23% 11707 / 13268
ironclaw_extensions 88.26% 2631 / 2981
ironclaw_reborn_composition 88.79% 69825 / 78645
ironclaw_host_runtime 88.94% 17522 / 19700
ironclaw_reborn 89.14% 15703 / 17616
ironclaw_conversations 90% 2924 / 3249
ironclaw_approvals 90.51% 1507 / 1665
ironclaw_event_streams 91.48% 1009 / 1103
ironclaw_loop_support 92.46% 14725 / 15926
ironclaw_attachments 93.06% 630 / 677
ironclaw_resources 93.07% 4622 / 4966
ironclaw_reborn_webui_ingress 93.19% 2217 / 2379
ironclaw_telegram_v2_adapter 93.87% 2452 / 2612
ironclaw_agent_loop 94.58% 8776 / 9279
ironclaw_safety 94.8% 3668 / 3869
ironclaw_first_party_extension_ports 95% 3094 / 3257
ironclaw_outbound 95.59% 3556 / 3720

This table itself is informational and never gates the PR on its own — not the percentage, not the per-crate holes, not the 0-coverage callout. A separate coverage ratchet (dry-run until enforce=true; see tests/integration/coverage-floor.toml) can fail the build on specific configured floors.

Exemptions (4 entry/entries excluded from the accounting above)
Module / Crate Reason Issue
crate: ironclaw_embeddings v1-only: consumed only by root ironclaw (src/app.rs, src/tools/builtin/memory.rs, src/workspace/mod.rs, src/config/{mod,embeddings}.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_gateway v1-only: consumed only by root ironclaw (src/channels/web/platform/static_files.rs, src/channels/web/handlers/frontend.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_oauth v1-only: consumed only by root ironclaw (src/auth/oauth.rs); no crates/* dependents. Crate's own doc comment confirms v1-only. Covered by "Tests (Legacy)". #5657
crate: ironclaw_tui v1-only: consumed only by root ironclaw (src/main.rs, src/channels/tui.rs); no crates/* dependents. Crate's own doc comment confirms it bridges INTO v1, not Reborn. Covered by "Tests (Legacy)". #5657

@italic-jinxin italic-jinxin added the human-verified Manually tested and verified label Jul 8, 2026
# Conflicts:
#	crates/ironclaw_webui_v2/frontend/src/pages/chat/chat.tsx
#	crates/ironclaw_webui_v2/frontend/src/pages/chat/lib/chat.test.ts
#	crates/ironclaw_webui_v2/frontend/src/pages/settings/settings-page.ts
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5824 July 9, 2026 03:22 Destroyed

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/ironclaw_webui_v2/frontend/src/i18n/hi.ts (1)

814-815: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the corrupted Hindi label.

automations.empty.matchingTitle contains mojibake (म��ल), so the filter title will render broken text in the UI.

Suggested patch
-  "automations.empty.matchingTitle": "कोई म��ल खाता ऑटोमेशन नहीं",
+  "automations.empty.matchingTitle": "कोई मेल खाता ऑटोमेशन नहीं",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ironclaw_webui_v2/frontend/src/i18n/hi.ts` around lines 814 - 815, The
Hindi translation for automations.empty.matchingTitle is corrupted and renders
mojibake in the UI, so update the affected entry in hi.ts to use the correct
Hindi title text. Keep the neighboring automations.empty.matchingDescription
unchanged and make sure the fix is applied in the i18n mapping for
automations.empty.matchingTitle so the filter label displays properly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@crates/ironclaw_webui_v2/frontend/src/i18n/hi.ts`:
- Around line 814-815: The Hindi translation for automations.empty.matchingTitle
is corrupted and renders mojibake in the UI, so update the affected entry in
hi.ts to use the correct Hindi title text. Keep the neighboring
automations.empty.matchingDescription unchanged and make sure the fix is applied
in the i18n mapping for automations.empty.matchingTitle so the filter label
displays properly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b4fab8ad-0b0d-438a-b946-ec5c8446514c

📥 Commits

Reviewing files that changed from the base of the PR and between 46dbb04 and f8020a2.

📒 Files selected for processing (16)
  • crates/ironclaw_webui_v2/frontend/src/app/routes.test.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/ar.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/de.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/en.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/es.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/fr.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/hi.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/ja.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/ko.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/pt-BR.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/uk.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/zh-CN.ts
  • crates/ironclaw_webui_v2/frontend/src/lib/interface-preferences.test.ts
  • crates/ironclaw_webui_v2/frontend/src/lib/interface-preferences.ts
  • crates/ironclaw_webui_v2/frontend/src/pages/chat/chat.tsx
  • crates/ironclaw_webui_v2/frontend/src/pages/chat/lib/chat.test.ts
💤 Files with no reviewable changes (1)
  • crates/ironclaw_webui_v2/frontend/src/pages/chat/lib/chat.test.ts

@think-in-universe think-in-universe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approve with notes:

  • The preference of showing/hiding thread-scope log button preference is now saved in local storage. We may need to be careful about this since users may think the preference is persistent across devices.

@think-in-universe
think-in-universe added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 7b49d40 Jul 9, 2026
62 checks passed
@think-in-universe
think-in-universe deleted the issue-5705-hide-terminal-icon branch July 9, 2026 08:49

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-5824 — f8020a24 Deployed Jul 9, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs human-verified Manually tested and verified risk: low Changes to docs, tests, or low-risk modules size: L 200-499 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal icon in chat UI has no disable option

2 participants