Skip to content

fix: purple dot, path display, shortcut symbols, tab flash#117

Merged
grimmerk merged 10 commits intomainfrom
fix/project-path-display
Apr 9, 2026
Merged

fix: purple dot, path display, shortcut symbols, tab flash#117
grimmerk merged 10 commits intomainfrom
fix/project-path-display

Conversation

@grimmerk
Copy link
Copy Markdown
Owner

@grimmerk grimmerk commented Apr 9, 2026

Summary

Mixed fix + polish PR covering several improvements.

Fix: purple dot for sessions with large responses (#116)

scanInitialStatuses() used tail -n 50 via execFile with default maxBuffer of 1 MB. For sessions with large assistant responses, the last 50 lines exceeded 1 MB (observed: 2.1 MB), causing silent failure → no status file → purple dot forever.

Fix: Reduced to tail -n 15 + raised maxBuffer to 5 MB + added error logging.

Fix: tab flash on startup

Previously useState('projects') + async IPC to get default mode → visible tab switch. Now the default mode is passed via URL hash from main process, parsed synchronously by renderer.

Style: project paths display ~/

Replace /Users/<username>/ with ~/ in the Projects tab. Reduces visual noise.

Feat: project search supports ~/ and full path

  • ~/git/codev expands ~ to home dir for matching
  • Full path and ~/-shortened path are both searchable
  • Highlight splits path tokens into segments for correct highlighting in the split name/path layout

Style: shortcut uses macOS symbols

Title bar: Cmd+Ctrl+R⌘⌃R. Uses standard macOS modifier symbols.

Feat: click shortcut → Settings Shortcuts tab

Clicking the shortcut text opens Settings directly on the Shortcuts tab.

Style: needs-attention dot + working pulse

  • Needs-attention: orange #FFA726 → warm red #F06856
  • Working pulse: 2s → 2.5s

Style: normal mode banner only on first launch

Uses electron-settings to persist the "banner seen" flag.

Debug logging

Added console.log/console.error (behind isDebug in main.ts, error-path-only elsewhere) to session detection, cleanup, and scan. All catch {} blocks now log errors.

Test plan

  • Purple dot session shows correct green dot
  • No tab flash on startup (default tab loads immediately)
  • Project paths show ~/git/...
  • Search ~/git matches and highlights
  • Search /Users/grimmer/git filters and highlights correctly
  • Search with trailing slash works (~/git/)
  • Title bar shows ⌘⌃R
  • Clicking ⌘⌃R opens Settings → Shortcuts tab
  • Needs-attention dot is warm red, distinct from working orange
  • Working pulse is 2.5s
  • Normal mode banner only shows on first launch
  • No debug logs in production build (yarn make)

🤖 On behalf of @grimmerk — generated with Claude Code

- Fix #116: session status scan failed silently when JSONL
  tail exceeded execFile maxBuffer (1MB). Reduced tail from
  50 to 15 lines + raised maxBuffer to 5MB.
- Display ~/  instead of /Users/<user>/ in project paths
- Search supports ~/ prefix and full path matching
- Shortcut uses macOS symbols (⌃⌘R not Cmd+Ctrl+R)
- Click shortcut in title bar → Settings Shortcuts tab
- Add debug logging to session detection + status scan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a home-dir IPC and renderer API, popup wiring to open specific Settings tabs, macOS accelerator→symbol rendering, project-path ~/ normalization/search and highlighting, reduces tail read and increases execFile maxBuffer for session-status scanning, and adds logging/error reporting across session detection and status I/O.

Changes

Cohort / File(s) Summary
Version & Changelog
CHANGELOG.md, package.json
Bumped package version to 1.0.74 and added changelog entries for session-status fixes, UI/style tweaks, shortcut→settings behavior, and project-search improvements.
Home Dir IPC & Types
src/electron-api.d.ts, src/main.ts, src/preload.ts
Added get-home-dir IPC handler (returns os.homedir()), exposed electronAPI.getHomeDir() in preload, and declared getHomeDir(): Promise<string> in electron API types.
Popup props & wiring
src/popup.tsx, src/switcher-ui.tsx
Added openToTab/onOpenToTabConsumed props and wiring so shortcut badge opens Settings → Shortcuts; state plumbing to consume the open-to-tab request.
Project path display & search
src/switcher-ui.tsx
Cached home-dir usage and shortenPath() to show ~/ prefixes, expanded project filtering to match full paths and ~/ forms, normalized highlight terms, and adjusted option label highlighting.
Shortcut rendering & UI tweaks
src/switcher-ui.tsx
Converted accelerator strings to macOS symbols on macOS, changed default shortcut fallback, changed needs-attention dot color, slowed working pulse animation, and added one-time normal-app-mode banner via localStorage.
Session-status scanning & detection
src/session-status-hooks.ts, src/claude-session-utility.ts, src/main.ts
Reduced tail read (50→15 lines) and increased execFile maxBuffer to 5MB; replaced silent failures with console logging across PID liveness checks, history lookups, tail errors, status-file cleanup, write/rename ops, and outer try/catch blocks; added debug logging to get-session-statuses.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Renderer as Renderer (UI)
participant Preload as Preload (contextBridge)
participant Main as Main Process
participant OS as OS (node:os)

Renderer->>Preload: window.electronAPI.getHomeDir()
Preload->>Main: ipcRenderer.invoke('get-home-dir')
Main->>OS: os.homedir()
OS-->>Main: homeDir string
Main-->>Preload: resolve IPC with homeDir
Preload-->>Renderer: Promise resolves with homeDir

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 A hop, a click, the tab pops wide,

~/ folds up cozy at my side,
Keys become symbols, sleek and small,
Status dots soften, pulses slow their call,
Version 1.0.74 — a rabbit’s quiet pride. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title concisely summarizes the main fixes and UI improvements in the PR: purple dot bug fix, path display changes, shortcut symbols, and tab opening functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/project-path-display

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

grimmerk and others added 2 commits April 10, 2026 03:13
The actual formatOptionLabel is inline in the Select JSX prop,
not the module-scope function. Applied shortenPath() to the
inline version and removed the unused module-scope function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Needs-attention dot: #FFA726 (orange) → #F06856 (warm red)
  for clearer distinction from working (#E8956A orange)
- Working pulse animation: 2s → 2.5s (slower, more distinct)
- Full path search now highlights in shortened ~/  display

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@grimmerk grimmerk marked this pull request as ready for review April 9, 2026 19:25
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 9 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/session-status-hooks.ts">

<violation number="1" location="src/session-status-hooks.ts:276">
P3: Stale comments still reference "50 lines" after reducing `tail` to 15 lines. The function docstring (`Reads last ~50 lines`) and the inline comment at line 297 (`// Read last 50 lines`) should be updated to match.</violation>
</file>

<file name="src/preload.ts">

<violation number="1" location="src/preload.ts:7">
P2: `sendSync` blocks the renderer's main thread until the main process responds. Use `ipcRenderer.invoke` instead, which is async and consistent with every other getter in this file (e.g., `getAppVersion`, `getIDEPreference`). The home directory value doesn't change at runtime, so it could also be fetched once on startup and cached.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
src/session-status-hooks.ts (1)

262-299: ⚠️ Potential issue | 🟡 Minor

Update stale comments to match the new tail -n 15 behavior.

The function docs/comments still mention reading ~50 lines, but implementation now reads 15. Please align comments to prevent future confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/session-status-hooks.ts` around lines 262 - 299, Update the function
comment/docstring for scanInitialStatuses and the inline comment above tailFile
to reflect that we now read the last 15 lines (not ~50); edit the header comment
that currently says "Reads last ~50 lines..." and the inline note "// Use 15
lines (not 50) — ..." so both clearly state "15 lines" and keep the existing
rationale about large assistant messages and maxBuffer/timeouts; reference the
tailFile helper and the scanInitialStatuses function when making the change.
🧹 Nitpick comments (3)
src/claude-session-utility.ts (1)

895-946: Gate new session-detection logs behind debug mode (and avoid raw cwd in normal runs).

These logs are useful for diagnosis, but they currently run unconditionally and include session identifiers/path data. Consider routing them through a debug logger and redacting cwd outside debug builds.

Also applies to: 966-967

src/preload.ts (1)

7-7: Migrate getHomeDir to async IPC pattern for consistency.

While the get-home-dir handler is trivial and the blocking risk is minimal, this should use ipcRenderer.invoke + ipcMain.handle to align with the established async pattern used throughout the codebase (40+ other IPC operations). All similar getter methods already use this pattern.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/preload.ts` at line 7, Change the synchronous getHomeDir export to use
the async IPC pattern: replace the use of ipcRenderer.sendSync('get-home-dir')
in the getHomeDir export with ipcRenderer.invoke('get-home-dir') and ensure the
main-process handler uses ipcMain.handle('get-home-dir', ...) instead of a
synchronous listener; also update any callers of getHomeDir to await the
returned Promise so they continue to receive the home directory string
asynchronously.
src/switcher-ui.tsx (1)

962-968: Use a real button for the shortcut badge.

This new affordance is mouse-only right now. A clickable <span> won't receive keyboard focus or Enter/Space activation, so keyboard users can't use the shortcut-to-settings path.

♿ Suggested fix
-            <span
+            <button
+              type='button'
               onClick={() => setSettingsOpenToTab('shortcuts')}
-              title="Click to customize shortcuts"
-              style={{ fontSize: '10px', color: '#555', cursor: 'pointer' }}
+              title='Click to customize shortcuts'
+              style={{
+                fontSize: '10px',
+                color: '#555',
+                cursor: 'pointer',
+                background: 'none',
+                border: 'none',
+                padding: 0,
+              }}
               onMouseEnter={(e) => { e.currentTarget.style.color = '#888'; }}
               onMouseLeave={(e) => { e.currentTarget.style.color = '#555'; }}
             >
               {quickSwitcherShortcut}
-            </span>
+            </button>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/switcher-ui.tsx` around lines 962 - 968, Replace the non-interactive
<span> used as the "shortcuts" badge with a proper interactive element: change
the span to a <button type="button"> (or a styled Button component) and keep the
existing click handler setSettingsOpenToTab('shortcuts'), title, inline styles
(or move to CSS class), and hover color changes; ensure the element has an
accessible name (aria-label or visible text) so it receives keyboard focus and
is activatable via Enter/Space, and remove any custom onKey handlers since a
native button handles keyboard activation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/switcher-ui.tsx`:
- Around line 1484-1490: searchWords currently turns a full/home-relative path
query like "~/work/codev" into a single token which doesn't match either the
name or path Highlighter because the UI renders them separately; fix by deriving
two arrays: nameSearchWords (use the last path segment for tokens containing '/'
or starting with '~/') and pathSearchWords (use the leading path portion for
those tokens, keeping original tokens for pure-name queries), then pass
nameSearchWords to the project-name Highlighter and pathSearchWords to the path
Highlighter; implement this near where searchWords is computed (referencing
getHomeDir, searchWords, nameSearchWords, pathSearchWords, shortenPath, label)
so full-path or home-relative queries highlight correctly across the split
name/path layout.

---

Outside diff comments:
In `@src/session-status-hooks.ts`:
- Around line 262-299: Update the function comment/docstring for
scanInitialStatuses and the inline comment above tailFile to reflect that we now
read the last 15 lines (not ~50); edit the header comment that currently says
"Reads last ~50 lines..." and the inline note "// Use 15 lines (not 50) — ..."
so both clearly state "15 lines" and keep the existing rationale about large
assistant messages and maxBuffer/timeouts; reference the tailFile helper and the
scanInitialStatuses function when making the change.

---

Nitpick comments:
In `@src/preload.ts`:
- Line 7: Change the synchronous getHomeDir export to use the async IPC pattern:
replace the use of ipcRenderer.sendSync('get-home-dir') in the getHomeDir export
with ipcRenderer.invoke('get-home-dir') and ensure the main-process handler uses
ipcMain.handle('get-home-dir', ...) instead of a synchronous listener; also
update any callers of getHomeDir to await the returned Promise so they continue
to receive the home directory string asynchronously.

In `@src/switcher-ui.tsx`:
- Around line 962-968: Replace the non-interactive <span> used as the
"shortcuts" badge with a proper interactive element: change the span to a
<button type="button"> (or a styled Button component) and keep the existing
click handler setSettingsOpenToTab('shortcuts'), title, inline styles (or move
to CSS class), and hover color changes; ensure the element has an accessible
name (aria-label or visible text) so it receives keyboard focus and is
activatable via Enter/Space, and remove any custom onKey handlers since a native
button handles keyboard activation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0809adcd-3f87-4907-96dc-0b7974777158

📥 Commits

Reviewing files that changed from the base of the PR and between 8687d33 and a668f2d.

📒 Files selected for processing (9)
  • CHANGELOG.md
  • package.json
  • src/claude-session-utility.ts
  • src/electron-api.d.ts
  • src/main.ts
  • src/popup.tsx
  • src/preload.ts
  • src/session-status-hooks.ts
  • src/switcher-ui.tsx

grimmerk and others added 2 commits April 10, 2026 03:48
- cubic P2: sendSync → ipcRenderer.invoke (async) for getHomeDir
- cubic P3: update stale comments "50 lines" → "15 lines"
- CodeRabbit: split searchWords into nameSearchWords/pathSearchWords
  so full-path queries highlight correctly in split name/path layout

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pathSearchWords was cutting at lastIndexOf('/'), causing partial
highlight (e.g. ~/git/fred/packages only highlighted ~/git/fred).
Now path Highlighter uses full searchWords for correct substring
match, name Highlighter uses nameSearchWords (last segment only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/switcher-ui.tsx`:
- Around line 961-967: Replace the non-focusable span used to open the Shortcuts
tab with a real button element in switcher-ui.tsx: swap the <span> into a
<button type="button"> and keep the existing onClick that calls
setSettingsOpenToTab('shortcuts'), title and visual styling, and remove the
mouse-only onMouseEnter/onMouseLeave color tweaks (instead use CSS :hover/:focus
or onFocus/onBlur to provide the same visual feedback) so the control is
keyboard-focusable and activatable while preserving the look and behavior.
- Around line 171-179: The module-global _homeDir/_homePrefix cache is updated
asynchronously via window.electronAPI.getHomeDir() so components won't rerender
when it resolves; move this lookup into React component state instead: call
window.electronAPI.getHomeDir() inside a useEffect, store the result in useState
(e.g. homeDir and homePrefix) and replace usages of the module-level
getHomeDir/_homePrefix with the state values so the UI updates when the async
IPC resolves (update any helper functions or consumers that reference
getHomeDir() to accept the state or read the state directly).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c60e9885-349b-467d-b66d-13c5c093fb22

📥 Commits

Reviewing files that changed from the base of the PR and between 3575d55 and a3fc744.

📒 Files selected for processing (1)
  • src/switcher-ui.tsx

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/switcher-ui.tsx">

<violation number="1">
P2: Path highlighting regresses for full-path search terms. When the user types `~/git/codev`, `searchWords` is `["~/git/codev"]` which is longer than the displayed path (`~/git`), so the path Highlighter finds no substring match. The removed `pathSearchWords` handled this by stripping the trailing segment. Consider keeping a `pathSearchWords` derivation or splitting each search word into both its full form and its directory prefix so the path Highlighter can still match.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

grimmerk and others added 2 commits April 10, 2026 04:47
- Split path tokens into all segments for both Highlighters
- Strip trailing / from search input
- Normalize /Users/<user> (without trailing /) to ~
- Deduplicate highlight words

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use localStorage to track if the banner has been shown.
Subsequent launches skip the "drag to reposition" banner.
Mode-switch banners still show every time (intentional).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
src/switcher-ui.tsx (2)

171-179: ⚠️ Potential issue | 🟡 Minor

Make the home-dir lookup reactive.

_homeDir / _homePrefix are filled asynchronously outside React state, so the first render can stay on /Users/... and ~/ search/highlighting won't update until some unrelated rerender happens. Move this into component state via useEffect, then have shortenPath and the filter/highlighter read that state.

As per coding guidelines, "Use async/await for asynchronous operations."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/switcher-ui.tsx` around lines 171 - 179, The code currently populates
module-level vars _homeDir/_homePrefix asynchronously causing non-reactive UI;
move this into React state by adding a useState (e.g., const [homeDir,
setHomeDir] = useState('')) and call window.electronAPI?.getHomeDir with an
async function inside useEffect (use async/await) to setHomeDir and compute a
derived homePrefix state or memo; then update getHomeDir usages (or remove
module-level getHomeDir) and make shortenPath and any filter/highlighter read
the new homeDir/homePrefix state or derived value so the UI updates immediately
when the async lookup completes.

961-967: ⚠️ Potential issue | 🟡 Minor

Use a real button for the shortcut affordance.

This opens Settings but is still a mouse-only <span>, so it cannot be focused or activated from the keyboard. A styled button type="button" keeps the same look without dropping accessibility.

Suggested fix
-            <span
+            <button
+              type="button"
               onClick={() => setSettingsOpenToTab('shortcuts')}
+              aria-label="Customize shortcuts"
               title="Click to customize shortcuts"
-              style={{ fontSize: '10px', color: '#555', cursor: 'pointer' }}
+              style={{
+                fontSize: '10px',
+                color: '#555',
+                cursor: 'pointer',
+                background: 'transparent',
+                border: 'none',
+                padding: 0,
+              }}
               onMouseEnter={(e) => { e.currentTarget.style.color = '#888'; }}
               onMouseLeave={(e) => { e.currentTarget.style.color = '#555'; }}
+              onFocus={(e) => { e.currentTarget.style.color = '#888'; }}
+              onBlur={(e) => { e.currentTarget.style.color = '#555'; }}
             >
               {quickSwitcherShortcut}
-            </span>
+            </button>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/switcher-ui.tsx` around lines 961 - 967, The clickable span used to open
Settings should be replaced with a real, focusable button to restore keyboard
accessibility: change the element using setSettingsOpenToTab('shortcuts') from a
<span> to a <button type="button">, keep the existing title, style, onClick,
onMouseEnter and onMouseLeave handlers, and add an accessible name (aria-label
or visible text) if the visual content is non-descriptive so the control can be
focused and activated via keyboard; ensure button styling preserves the same
visual appearance and cursor behavior as before.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/switcher-ui.tsx`:
- Around line 865-879: The filter fails when tokens end with a trailing slash
because expanded tokens keep the slash while target contains slashless paths;
update the matching logic in the block that builds inputArray/subInput/expanded
(uses getHomeDir and the expanded variable) to normalize expanded by removing
any trailing slashes (and then lowercasing) before the target?.includes check so
tokens like "~/work/codev/" match "/Users/me/work/codev". Ensure the trimming
happens after the '~' expansion and before the includes call so expanded is the
canonical, slashless token used for matching.
- Around line 162-169: The acceleratorToSymbols function currently maps modifier
names by simple string replacement and doesn't enforce macOS modifier order;
update it to split the accelerator string on '+' (case-insensitive), normalize
tokens, collect modifier tokens into a map, then emit modifiers in the macOS
display order Shift (⇧), Control (⌃), Option/Alt (⌥), Command (⌘) followed by
the non-modifier key; ensure acceleratorToSymbols handles different casings and
preserves the final key token unchanged while joining the symbol modifiers
before it.

---

Duplicate comments:
In `@src/switcher-ui.tsx`:
- Around line 171-179: The code currently populates module-level vars
_homeDir/_homePrefix asynchronously causing non-reactive UI; move this into
React state by adding a useState (e.g., const [homeDir, setHomeDir] =
useState('')) and call window.electronAPI?.getHomeDir with an async function
inside useEffect (use async/await) to setHomeDir and compute a derived
homePrefix state or memo; then update getHomeDir usages (or remove module-level
getHomeDir) and make shortenPath and any filter/highlighter read the new
homeDir/homePrefix state or derived value so the UI updates immediately when the
async lookup completes.
- Around line 961-967: The clickable span used to open Settings should be
replaced with a real, focusable button to restore keyboard accessibility: change
the element using setSettingsOpenToTab('shortcuts') from a <span> to a <button
type="button">, keep the existing title, style, onClick, onMouseEnter and
onMouseLeave handlers, and add an accessible name (aria-label or visible text)
if the visual content is non-descriptive so the control can be focused and
activated via keyboard; ensure button styling preserves the same visual
appearance and cursor behavior as before.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3437335b-15bd-45c0-b453-07b5222e6059

📥 Commits

Reviewing files that changed from the base of the PR and between a3fc744 and 38115ed.

📒 Files selected for processing (1)
  • src/switcher-ui.tsx

grimmerk and others added 3 commits April 10, 2026 05:00
localStorage doesn't reliably persist across yarn start restarts
in dev mode. Use electron-settings (file-based) instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pass default-switcher-mode via URL hash from main process
to renderer, so useState initializes with the correct tab
immediately. No more projects→sessions flash.

Previously: useState('projects') + async IPC to get default
mode → visible tab switch after IPC round trip.

Now: main reads setting before createSwitcherWindow, appends
#mode=sessions to loadURL, renderer parses hash synchronously.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- filterOptions: strip trailing / from search tokens for
  defensive matching (mirrors highlight searchWords logic)
- CHANGELOG: add tab flash fix, banner, and all style changes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@grimmerk grimmerk changed the title fix: purple dot bug + path display + shortcut symbols fix: purple dot, path display, shortcut symbols, tab flash Apr 9, 2026
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="CHANGELOG.md">

<violation number="1" location="CHANGELOG.md:10">
P3: Modifier symbol order `⌘⌃R` doesn't match Apple's standard order or the actual UI output. The code (switcher-ui.tsx:162, 675) renders `⌃⌘R` (Control before Command), which follows Apple's HIG. The changelog should match.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

- Reduced to 15 lines + raised maxBuffer to 5MB
- Fix: eliminate tab flash on startup (default tab now passed via URL hash)
- Style: project paths display `~/` instead of `/Users/<user>/`
- Style: shortcut display uses macOS symbols (`⌘⌃R` instead of `Cmd+Ctrl+R`)
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Apr 9, 2026

Choose a reason for hiding this comment

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

P3: Modifier symbol order ⌘⌃R doesn't match Apple's standard order or the actual UI output. The code (switcher-ui.tsx:162, 675) renders ⌃⌘R (Control before Command), which follows Apple's HIG. The changelog should match.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At CHANGELOG.md, line 10:

<comment>Modifier symbol order `⌘⌃R` doesn't match Apple's standard order or the actual UI output. The code (switcher-ui.tsx:162, 675) renders `⌃⌘R` (Control before Command), which follows Apple's HIG. The changelog should match.</comment>

<file context>
@@ -5,12 +5,14 @@
+- Fix: eliminate tab flash on startup (default tab now passed via URL hash)
 - Style: project paths display `~/` instead of `/Users/<user>/`
-- Style: shortcut display uses macOS symbols (`⌃⌘R` instead of `Cmd+Ctrl+R`)
+- Style: shortcut display uses macOS symbols (`⌘⌃R` instead of `Cmd+Ctrl+R`)
+- Style: needs-attention dot changed from orange `#FFA726` to warm red `#F06856`
+- Style: working pulse animation slowed from 2s to 2.5s
</file context>
Suggested change
- Style: shortcut display uses macOS symbols (`⌘⌃R` instead of `Cmd+Ctrl+R`)
- Style: shortcut display uses macOS symbols (`⌃⌘R` instead of `Cmd+Ctrl+R`)
Fix with Cubic

@grimmerk grimmerk merged commit 06014bd into main Apr 9, 2026
2 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.

1 participant