Skip to content

Add configurable sidebar thread preview count#1856

Open
Marve10s wants to merge 9 commits intopingdotgg:mainfrom
Marve10s:feat/sidebar-thread-preview-limit
Open

Add configurable sidebar thread preview count#1856
Marve10s wants to merge 9 commits intopingdotgg:mainfrom
Marve10s:feat/sidebar-thread-preview-limit

Conversation

@Marve10s
Copy link
Copy Markdown
Contributor

@Marve10s Marve10s commented Apr 9, 2026

What changed

  • Adds a configurable visible-thread count for the sidebar, clamped to 2-10.
  • Replaces the old radio-style count picker with a compact - / numeric input / + control.
  • Persists the setting in client settings and migrates legacy values.

Notes

  • The input is text-based so the browser spinner arrows do not appear.
  • The control is inside the sidebar menu, so key handling is stopped at capture phase to keep typed digits editable.
  • This branch also still includes the dev bootstrap fix in apps/web/vite.config.ts that was needed to verify the app locally.

Validation

  • bun fmt
  • bun lint
  • bun typecheck

Note

Medium Risk
Adds a new persisted client setting and updates sidebar rendering/menu logic to use it, so regressions could affect settings deserialization or thread list visibility across web/desktop.

Overview
Adds a configurable sidebar thread preview limit. The sidebar no longer uses a hardcoded 6 thread preview cap; it now reads/writes a persisted sidebarThreadPreviewCount setting and clamps values to 2–10.

Updates the sidebar options menu to include a compact - / numeric input / + control for this value (with key handling to avoid menu shortcuts interfering), and updates the settings restore-defaults prompt to include Visible threads when changed. Tests for desktop persistence and the web localApi bridge/storage paths are updated to include the new setting.

Reviewed by Cursor Bugbot for commit 2e8255d. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add configurable sidebar thread preview count per project

  • Adds a sidebarThreadPreviewCount setting (default: 6, clamped between min and max) to ClientSettingsSchema in settings.ts.
  • Replaces the hardcoded THREAD_PREVIEW_LIMIT in Sidebar.tsx with the new user setting, so collapsed project thread lists reflect the stored preference.
  • Adds a 'Visible threads' control to the sidebar options menu (ProjectSortMenu) with increment/decrement buttons and a numeric input that clamps and persists changes immediately.
  • Includes sidebarThreadPreviewCount in the restore-defaults flow in SettingsPanels.tsx so it appears in the confirmation message when it differs from the default.

Macroscope summarized 2e8255d.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ce811a3d-b37b-4eb9-9e9e-9c4489129da8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 9, 2026
@Marve10s Marve10s marked this pull request as ready for review April 9, 2026 18:48
@Marve10s
Copy link
Copy Markdown
Contributor Author

Marve10s commented Apr 9, 2026

Why ? When working on more than 3+ projects with default thread number, I need to scroll. Instead, I'd prefer to have less threads because I don't need 6 by default while working on multiple stuff.
https://github.com/user-attachments/assets/7645ee08-478c-44fc-8fbb-4157a4821bac

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit afe3877. Configure here.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 9, 2026

Approvability

Verdict: Approved

This PR adds a user-configurable setting for sidebar thread preview count (2-10), replacing a hardcoded value. The changes are self-contained UI preferences with proper validation, affecting only display count in the sidebar with no security or runtime behavior implications beyond the intended feature.

You can customize Macroscope's approvability policy. Learn more.

Drop the blank-line removal that was left over from the dev
bootstrap fix commits — not in scope for this PR.
@Marve10s
Copy link
Copy Markdown
Contributor Author

Marve10s commented Apr 9, 2026

Approvability

Verdict: Needs human review

The sidebar thread preview count feature itself is straightforward, but there is an unresolved high-severity bug comment identifying that the vite.config.ts changes may cause startup crashes when VITE_WS_URL is not configured. This unrelated change bundled into the PR requires human attention.

You can customize Macroscope's approvability policy. Learn more.

fyi Added by accident, PR is no longer contains Vite config changes

Resolve merge conflicts:
- settings.ts: keep sidebarThreadPreviewCount with Effect.succeed() pattern
- useSettings.ts: drop removed migration functions, keep upstream's reset helper
- useSettings.test.ts: delete (migration tests no longer needed)
The clientPersistence test was missing the new field after merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant