Skip to content

Add configurable sidebar thread preview count#1856

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

Add configurable sidebar thread preview count#1856
Marve10s wants to merge 14 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

Low Risk
Primarily UI and client-side settings schema changes; risk is limited to sidebar rendering/interaction and settings persistence defaults.

Overview
Adds a new client setting, sidebarThreadPreviewCount (default 6, clamped 210), to the shared settings contracts and updates persistence tests to include it.

Updates the web sidebar to replace the hardcoded thread preview limit with the user setting, and adds a "Visible threads" +/- + numeric input control to the sidebar options menu to update the setting. Settings restore-defaults confirmation now also lists "Visible threads" when this value differs from default.

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

Note

Add configurable sidebar thread preview count with controls in sidebar options menu

  • Adds a sidebarThreadPreviewCount field to ClientSettings with a default of 6 and a valid range of [2, 10], defined in settings.ts.
  • Replaces the fixed THREAD_PREVIEW_LIMIT in the sidebar with the user-configured value for both collapsed project previews and per-project thread slicing.
  • Exposes increment/decrement buttons and a numeric input in the sidebar options menu (ProjectSortMenu) to adjust the count, which persists to client settings.
  • Restoring defaults now includes resetting sidebarThreadPreviewCount to 6.

Macroscope summarized 02fce1a.

@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: 14a1a4f1-d8f6-4b56-828d-8d2f91dc847e

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

Comment thread apps/web/vite.config.ts Outdated
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 9, 2026

Approvability

Verdict: Approved

Straightforward UI feature adding a user-configurable sidebar thread preview count setting. Replaces a hardcoded constant (6) with a bounded configurable value (2-10, default 6). Changes are self-contained to the sidebar UI and settings schema with no backend or runtime behavior implications beyond the visual preference.

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.
macroscopeapp[bot]
macroscopeapp bot previously approved these changes Apr 10, 2026
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 bb60b2c. Configure here.

Comment thread apps/web/src/components/Sidebar.tsx Outdated
@macroscopeapp macroscopeapp bot dismissed their stale review April 16, 2026 09:27

Dismissing prior approval to re-evaluate 02fce1a

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