Skip to content

fix(desktop): unbreak the renderer build (22 tsc errors) + active-glow sidebar rows#127

Merged
OmarB97 merged 1 commit into
mainfrom
fix/desktop-build-and-sidebar
Jun 9, 2026
Merged

fix(desktop): unbreak the renderer build (22 tsc errors) + active-glow sidebar rows#127
OmarB97 merged 1 commit into
mainfrom
fix/desktop-build-and-sidebar

Conversation

@OmarB97

@OmarB97 OmarB97 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Why

The desktop app could not be rebuilt: tsc -b failed with 22 errors because the sidebar consolidation landed components importing stores that never landed (@/store/cron, layout drag-order/cron-open/overlay atoms, session yolo-default + presence exports, en/zh handoffOrigin). Since npm run build gates on tsc, dist/ was frozen at a pre-consolidation bundle — the packaged app still showed line-2 source labels ("Terminal") and per-device group headers, which the operator flagged as UI bugs. They were stale-build artifacts. This PR makes the app buildable again and applies the requested row design: flat single-line rows, relative timestamp on idle rows, pulsing orange dot (timestamp hidden) on active rows.

What changed

  • store/layout.ts: restore $sidebarOverlayMounted, persisted session/workspace drag-order atoms, $sidebarCronOpen + setters, using the original storage keys (hermes.desktop.sessionOrder etc.) so existing prefs survive.
  • store/session.ts: restore DEFAULT_DESKTOP_YOLO_ACTIVE / $desktopYoloDefault / setDesktopYoloDefaultActive (yolo-default-on feature) and $sessionPresence / setSessionPresence.
  • store/cron.ts (new): $cronJobs + refreshCronJobs() sidebar projection; refreshed on gateway-open.
  • chat/sidebar/cron-jobs-section.tsx (new): collapsible Cron jobs section (hover actions: play = trigger now, gear = manage) reusing existing t.cron strings — no new i18n keys.
  • desktop-controller.tsx: drop extraneous onArchiveAllSessions, wire onManageCronJob/onTriggerCronJob, refresh cron jobs on gateway open.
  • virtual-session-list.tsx: remove dead showSourceBadge/showDeviceBadge plumbing (rows are single-line by design).
  • session-row.tsx: active rows pulse an orange dot and hide the relative timestamp; idle rows keep the static grey dot + age.
  • i18n/en.ts, i18n/zh.ts: add missing sidebar.row.handoffOrigin (ja/zh-hant already had it).

How to review

  1. Diff store/layout.ts / store/session.ts against the originals (3fc67b733, db0661401) — they are restorations, not new designs.
  2. store/cron.ts + cron-jobs-section.tsx are the only new surface; check the section renders nothing when $cronJobs is empty.
  3. session-row.tsx for the active-state UX change.
  4. Run npx tsc -b --force (0 errors) and npm run build in apps/desktop.

Evidence

  • tsc -b --force: 22 errors on main → 0 on this branch.
  • npm run build (previously impossible): succeeds, fresh dist/ bundle.
  • vitest src suite: 447 passed, 0 src failures (the 9 remaining failed files are node:test .cjs suites that vitest cannot host; under their own runner npm run test:desktop:platforms: 85 pass / 0 fail — pre-existing harness split).
  • yolo-session.test.ts passes again with the restored exports.

Verification

  • apps/desktop: npx tsc -b --force clean; npx vitest run --environment jsdom 447 passed; npm run test:desktop:platforms 85/0; npm run build green.
  • Not run: packaged-app smoke (npm run dist:mac) — operator's running app picks the rebuilt bundle on next restart; low risk since renderer-only changes.

Risks / gaps

  • $sidebarOverlayMounted currently has no writer (the hover-peek feature that sets it never landed) — defaults false so behavior matches today; low risk.
  • onManageCronJob navigates to the cron page without deep-linking the specific job — accepted scope, the cron page lists all jobs.
  • Sidebar cron section shows nothing until cron.list RPC succeeds once — no work item needed, hidden-by-default is the intended empty state.
  • Orange active-dot uses a fixed Tailwind orange rather than a theme token — accepted tradeoff per operator's explicit "glowing orange" spec.

Collaborators

  • @OmarB97 (operator)
  • Claude Fable 5 (Claude Code)

… active-glow + idle timestamps

The sidebar consolidation (#123 area) landed components importing stores
that never landed: @/store/cron, layout drag-order/cron-open/overlay atoms,
session yolo-default + presence exports, and the en/zh handoffOrigin i18n
key. tsc -b failed with 22 errors, so dist/ could not be rebuilt and the
packaged app kept serving the pre-consolidation sidebar (line-2 source
labels + device group headers) — the UI regressions were stale-build
artifacts, not source state.

- store/layout.ts: restore , persisted session /
  workspace drag-order atoms,  (+setters; same storage keys
  as the original drag-order commit so existing prefs survive)
- store/session.ts: restore DEFAULT_DESKTOP_YOLO_ACTIVE, ,
  setDesktopYoloDefaultActive, /setSessionPresence
- store/cron.ts (new):  + refreshCronJobs() projection for the
  sidebar section; refreshed on gateway-open in desktop-controller
- chat/sidebar/cron-jobs-section.tsx (new): collapsible Cron jobs section
  (clock row, hover play=trigger now, gear=manage) reusing t.cron strings
- desktop-controller: drop unused onArchiveAllSessions, wire
  onManageCronJob/onTriggerCronJob, refresh cron jobs on gateway open
- virtual-session-list: drop the dead showSourceBadge/showDeviceBadge
  plumbing (rows are single-line by design now)
- session-row: active sessions pulse an orange dot and hide the relative
  timestamp; idle rows keep the static grey dot + age (5m/2h/1d)
- i18n: add missing sidebar.row.handoffOrigin to en + zh

Verification: tsc -b --force 22 errors -> 0; vitest src suite green
(456 tests, 9 remaining failures are node:test .cjs files that pass under
npm run test:desktop:platforms: 85 pass / 0 fail); npm run build succeeds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@OmarB97 OmarB97 merged commit 48f77af into main Jun 9, 2026
13 of 19 checks passed
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

🔎 Lint report: fix/desktop-build-and-sidebar vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 10543 on HEAD, 10543 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5537 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

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