Fix dev blank screen and remote cron/dashboard API routing - #870
Open
dataguybobby wants to merge 6 commits into
Open
Fix dev blank screen and remote cron/dashboard API routing#870dataguybobby wants to merge 6 commits into
dataguybobby wants to merge 6 commits into
Conversation
Renames previously updated the local sessions.json cache first and swallowed state.db errors, so the UI looked successful until the next syncSessionCache restored the old Hermes title. Write the durable DB row first (honoring unique titles and the 100-char cap), only then mirror into the cache, and toast/rollback when the write fails. Co-authored-by: Cursor <cursoragent@cursor.com>
Pull title policy into src/shared/session-title and the optimistic rename UX into confirmSessionRename so the sidebar and Sessions modal stop duplicating toast/rollback/refocus logic. Keeps both screens under the 1k-line ceiling and prevents UI/DB whitespace drift on rename. Co-authored-by: Cursor <cursoragent@cursor.com>
fix: persist session renames through state.db sync
Dev: lazy-load Office to keep drei off the Chat startup path, pre-bundle Three.js deps (including SkeletonUtils), clear corrupt Vite cache, and recover from stale optimize-dep 504s with bounded reloads. Remote: route cron through dashboard /api/cron/jobs with gateway /api/jobs fallback on 404/405; reject dashboard HTML /health as gateway-ready; prefer /api/status for remote connection tests when not on legacy transport. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Greptile SummaryThis PR improves development startup, remote API routing, and session rename persistence. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "fix: address review feedback on dev-relo..." | Re-trigger Greptile |
- Throttle the dev vite:preloadError reload via sessionStorage so a persistent failure surfaces an error instead of a reload loop - Make dev:clean cross-platform (ensure-vite-deps.mjs --force) instead of Unix-only rm -rf - Fix TS6133 unused param in vite-wait-for-drei middleware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dev blank screen (
npm run dev)Running Hermes Desktop locally could show a white window because the renderer failed during Vite module evaluation:
@react-three/drei(~3.5MB) pre-bundle races with Electron startup — Electron loads before the dep optimizer finishes..vitecache (.mappresent without.js) after interrupted re-optimizes.SkeletonUtils.js, triggering mid-session re-optimize that invalidated drei mid-request.Chat startup also eagerly imported the Office 3D stack, coupling startup to drei.
Remote cron and gateway readiness
Remote/dashboard mode had two related failures:
/api/jobs, which returns 405 when the active transport is the dashboard (/api/cron/jobs).isApiServerReadytreated dashboard SPA HTML responses on/healthas a healthy gateway, causing false positives during remote connection setup.Resolution
Dev loading
Layoutand Office3D inOfficeso Chat mounts without drei.@react-three/drei, fiber, three, troika, andSkeletonUtilsviaoptimizeDeps.include.scripts/ensure-vite-deps.mjsclears corrupt drei cache entries beforenpm run dev.scripts/vite-wait-for-drei.tsblocks the first HTML response until drei pre-bundle completes.vite:preloadErrorreload in the renderer; main process reloads once if#rootis still empty after 4s.npm run dev:cleanfor stale cache resets.Remote API routing
listCronJobsand mutations prefer dashboard/api/cron/jobs, falling back to gateway/api/jobson 404/405./triggerto gateway/runon fallback.isApiServerReadyrejectstext/html/healthresponses./api/statuswhen chat transport is not legacy.Test plan
npm test— 1822 passednpm run dev— Chat tab loads on first launch (no blank screen)/api/jobsfallback/healthno longer marks gateway readyMade with Cursor