Skip to content

Add right-sidebar edge peek (extracted from #7423) - #8015

Closed
brennanb2025 wants to merge 11 commits into
mainfrom
feat/right-sidebar-edge-peek
Closed

brennanb2025 wants to merge 11 commits into
mainfrom
feat/right-sidebar-edge-peek

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Extracted from #7423 (authored by @hmrserver; commit credit preserved) so the subagents feature could land independently while this UX receives focused review.

What it does

Adds Arc-style edge peek for the right sidebar. When the sidebar is closed, hovering within 6px of the window's right edge for 250ms reveals it as a floating overlay without reflowing the editor. Moving left of the overlay dismisses it after 300ms; leaving or blurring the window dismisses immediately; explicitly opening the sidebar pins it.

Detection is window-geometry-based rather than an invisible DOM strip, so scrollbar clicks flush against the edge are not intercepted. Pressed-button movement and mousedown cancel arming, the top 36px titlebar zone is excluded for Windows/Linux custom chrome, portaled sidebar menus remain usable, and reduced-motion disables the slide-in animation.

The behavior is enabled by default and can be disabled under Appearance → Window & Sidebar → Advanced → Right Sidebar Edge Peek. A brief one-shot tooltip appears on the right edge after the user's first explicit close; successfully discovering the gesture dismisses it.

Electron validation

One-shot coachmark

Brief tooltip under the right-sidebar toggle after first close:

Edge peek tip on toggle

Close-up:

Edge peek tip on toggle close-up

Edge peek overlay

Edge peek floating overlay

Settings opt-out

Right Sidebar Edge Peek setting

Testing

  • 67 targeted tests pass for edge geometry/lifecycle, preferences, coachmark behavior, visibility consumers, watcher projection, and git-status scheduling.
  • Broad right-sidebar sweep: 1,342 tests passed. The remaining unrelated localStorage tests require the repository's declared Node 24 runtime rather than the local Node 26 runtime used for review.
  • pnpm typecheck passes (node, CLI, and web).
  • pnpm build:electron-vite passes, including the production renderer bundle.
  • Changed-file oxlint and oxfmt --check pass.
  • Max-lines ratchet, localization catalog parity, and localization coverage pass.

AI Review Report

The branch was reconciled with current main before review so the feature preserves the latest git-status scheduler, watcher cancellation, Source Control, SSH/runtime, and terminal-creation architecture.

Review found and fixed:

  • Leaving the Electron window through the top or bottom could leave an active peek stuck, or let an armed timer open after the cursor had already left. Document-boundary exit now cancels both lifecycles.
  • Radix dropdowns, context menus, popovers, and selects can portal left of the sidebar; the prior x-only rule dismissed the panel underneath them. Known interactive portal surfaces now count as part of the peek.
  • The PR's test still expected the retired 3-second git-status interval. It now proves a hidden→peek transition schedules exactly one immediate refresh through the current coalescing scheduler, without restoring interval polling.
  • Instructional copy was removed from toggle tooltips to follow the style guide's “tooltips name controls; they do not teach” rule. Discoverability remains in the brief one-shot edge tooltip and searchable setting.

Performance checks:

  • The hidden-state listener performs only button/titlebar/edge comparisons; there is no DOM interception or layout read.
  • Overlay geometry is read once and cached across ordinary mousemove frames, then invalidated only by resize. A deterministic call-count assertion covers this.
  • DOM ancestry inspection for portaled content runs only after the cheap geometry check says the pointer is left of the overlay.
  • A peek activates one visible-consumer refresh through the coalescing git-status scheduler. Dismissal returns polling/watch consumers to their hidden state, and current-main local/SSH/runtime watcher cancellation covers short peeks and failed installs.

Security Audit

This feature adds no IPC surface, subprocess, filesystem write, network endpoint, provider-specific behavior, or dependency. It uses renderer-local pointer events, transient non-persisted UI state, and existing settings persistence. The geometry detector intentionally renders no DOM hit target at the window edge.

Notes

  • Cross-platform: no hardcoded modifier behavior; Windows/Linux titlebar controls are excluded and macOS native chrome remains untouched.
  • SSH/runtime: peeks use the same owner-routed data paths and cancellation contracts as a pinned sidebar; no local-only assumptions were added.
  • Full pnpm lint currently reaches an unrelated current-main exhaustiveness error in skill-freshness-group.tsx; the 30 PR files pass changed-file lint.

Arc-style hover peek: when the right sidebar is closed, hovering the
window's right edge reveals it as a floating overlay without reflowing
the editor; moving away dismisses it, and an explicit open pins it.
Extracted unchanged from PR #7423 so it can be reviewed on its own.

Co-authored-by: Orca <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main change: right-sidebar edge peek behavior.
Description check ✅ Passed The description covers summary, screenshots, testing, AI review, security audit, and notes, matching the template well.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

Teach the edge-hover gesture via the existing toggle tooltip and a
one-shot first-close coachmark, and make Arc-style edge peek opt-out
in Appearance settings (default on).
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

Show a quiet right-edge tooltip for one second after the first sidebar
close instead of a heavy sonner toast, and keep the one-shot dismiss
behavior.
Point the one-shot hint at the titlebar toggle icon, hang it left so it
stays on-screen, and mention Settings for opt-out.
Update tip copy for the edge gesture and add a clickable Settings ›
Appearance › Right Sidebar Edge Peek link that opens the control.
Keep the deep-link target as Appearance › Right Sidebar Edge Peek; only
the visible label is shorter.
Keep sidebar-owned dialogs alive while interacting outside the overlay, isolate Git and file-watch subscriptions from the App render tree, and restore localization catalog parity for the one-shot tip.
Suppress arming during/after pointer and scroll gestures, skip when the
pointer is over a vertical scrollbar gutter or Monaco/xterm thumbs, and
re-check the cool-down when the open timer fires.
@OrcaWin

OrcaWin commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Moving this PR to draft because it has been untouched for more than 80 days (latest recorded PR activity or commit timestamp: 2026-07-17T02:25:34Z; checked on 2026-10-27). This keeps the review queue focused on active work while preserving the proposal. Please mark it ready for review when work resumes.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Closing: its issue #14651 is closed.

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.

3 participants