Skip to content

feat(ui): make message timeline hideable#428

Merged
shantur merged 3 commits intoNeuralNomadsAI:devfrom
Pagecran:fix/hide-message-timeline
May 10, 2026
Merged

feat(ui): make message timeline hideable#428
shantur merged 3 commits intoNeuralNomadsAI:devfrom
Pagecran:fix/hide-message-timeline

Conversation

@pascalandr
Copy link
Copy Markdown
Contributor

@pascalandr pascalandr commented May 10, 2026

Summary

  • Add a behavior setting to show or hide the message timeline sidebar.
  • Remove the timeline layout gutter when the sidebar is disabled.
  • Add setting labels for all supported locales.

Why

user wants a more minimal workspace and a little more horizontal room without losing the default timeline experience for everyone else.

Validation

  • npm run typecheck --workspace @codenomad/ui
  • git diff --check
  • npm run build:tauri, then launched the raw release exe

Fixes #418

Add a persisted behavior setting so users can hide the message timeline sidebar when they want a more minimal workspace.

The message stream now removes both the sidebar and its layout gutter when the setting is disabled, while preserving the default timeline experience for existing users.

Validated with UI typecheck, git diff --check, and a Tauri release build launched from the raw executable.
@pascalandr
Copy link
Copy Markdown
Contributor Author

@CodeNomadBot

I want you to perform the gatekeeper checks for latest PR state

check for regressions
check for better possible implementations
Be the PR gatekeeper
Be ruthless about code quality

@github-actions
Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25633524476

Artifacts expire in 7 days.
Artifacts: (none found on this run)

@codenomadbot
Copy link
Copy Markdown
Contributor

codenomadbot Bot commented May 10, 2026

Gatekeeper review for latest PR state.

Request understood: perform a strict review for regressions and better implementation options. Assumption: review-only unless a clear, tightly scoped fix is required.

Findings:

  • No blocking correctness regression found in the core hide/show behavior. packages/ui/src/components/message-section.tsx now gates both the timeline grid column and the sidebar render behind showTimeline(), so disabling the setting removes the gutter and the sidebar while preserving the existing default-on behavior.

  • Low severity implementation concern: packages/ui/src/lib/settings/behavior-registry.ts:131 adds behavior.messageTimeline with a setter that only works when updatePreferences is provided. Every nearby toggle either returns after updatePreferences or falls back to a typed action. Current usage in AppearanceSettingsSection passes updatePreferences, so this is not currently broken, but it makes the registry API inconsistent and creates a silent no-op if this setting is reused from another caller. Better implementation would be either adding a toggleShowMessageTimeline action/fallback or making updatePreferences non-optional for behavior settings.

Quality notes:

  • The setting is placed next to the existing timeline tool-call setting, which is reasonable.
  • All registered locales have the new settings.behavior.messageTimeline.* keys.
  • The timeline tool-call toggle remains configurable while the whole timeline is hidden. That is acceptable, but a slightly more polished UX would disable or visually subordinate it when showMessageTimeline is false.
  • The implementation intentionally hides the timeline UI but still maintains timeline segment state. That is probably the right minimal change because message visibility, active segment tracking, search mapping, and deletion selection currently share that state.

Validation:

  • git diff --check origin/dev...HEAD passed.
  • npm run typecheck --workspace @codenomad/ui could not be meaningfully validated in this bot checkout because both root and UI node_modules are missing. The command fails with missing dependency/type errors such as solid-js, @tauri-apps/*, marked, and @opencode-ai/sdk/*, which points to an uninstalled workspace rather than this PR diff.

File-size warning per repo guidance:

  • packages/ui/src/components/message-section.tsx is about 1651 lines and was touched.
  • packages/ui/src/stores/preferences.tsx is about 892 lines and was touched.

Verdict: no merge-blocking regression found from static review. I would only ask for the registry setter consistency fix if we want to keep the behavior settings API robust against future reuse.

--
Yours,
CodeNomadBot

Keep the behavior settings registry consistent when it is used without updatePreferences by wiring a typed toggle for the message timeline setting.

This avoids a silent no-op if the setting is reused from another registry caller while preserving the existing Settings behavior.

Validated with UI typecheck, permission reply tests, and git diff --check.
@shantur
Copy link
Copy Markdown
Collaborator

shantur commented May 10, 2026

@CodeNomadBot

Review again with latest changes

@codenomadbot
Copy link
Copy Markdown
Contributor

codenomadbot Bot commented May 10, 2026

Latest gatekeeper review for PR #428.

Request understood: re-review the latest PR state after new changes. Assumption: this is a review-only pass.

Findings:

  • No blocking regressions found.

  • The previous low-severity concern about behavior.messageTimeline silently no-oping without updatePreferences is resolved. Latest code adds toggleShowMessageTimeline, wires it through useConfig, App, useCommands, and AppearanceSettingsSection, and uses the same setBooleanByToggle(...) fallback pattern as the adjacent behavior toggles in packages/ui/src/lib/settings/behavior-registry.ts.

Quality notes:

  • The implementation remains tightly scoped: preference schema/default/normalization, settings registry, settings UI wiring, command registry action typing, translations, and the actual timeline render/layout gate.
  • Default behavior remains preserved with showMessageTimeline: true and ?? true reads, so existing users keep the timeline unless they disable it.
  • Disabling the setting removes both the sidebar render and message-layout--with-timeline, so the layout gutter is removed as requested.
  • Keeping timeline segment state alive while hiding the sidebar is acceptable here. It avoids risky coupling changes around search mapping, active-message tracking, and delete-selection behavior.
  • The timeline tool-call setting is still visible even when the whole timeline is hidden. I do not consider that a blocker, but it is the only UX polish opportunity left.

Validation:

  • git diff --check origin/dev...HEAD passed.
  • npm run typecheck --workspace @codenomad/ui still cannot be meaningfully validated in this bot checkout because dependencies are not installed. Both root node_modules and packages/ui/node_modules are missing, and the failure is dominated by missing modules/types such as solid-js, @tauri-apps/*, marked, and @opencode-ai/sdk/*.

File-size warning per repo guidance:

  • packages/ui/src/App.tsx is about 640 lines and was touched.
  • packages/ui/src/components/message-section.tsx is about 1651 lines and was touched.
  • packages/ui/src/lib/settings/behavior-registry.ts is about 502 lines and was touched.
  • packages/ui/src/stores/preferences.tsx is about 898 lines and was touched.

Verdict: approved from static gatekeeper review. No merge-blocking issues found in the latest diff; the previous registry consistency concern has been addressed.

--
Yours,
CodeNomadBot

@shantur shantur merged commit 3425310 into NeuralNomadsAI:dev May 10, 2026
10 of 11 checks passed
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.

[Improvement / Feature Request] Make the Timeline hideable

2 participants