Skip to content

Retry initial project load and surface failures in the sidebar - #122

Open
justinleveck wants to merge 1 commit into
chrkaatz:mainfrom
justinleveck:fix/retry-initial-project-load
Open

Retry initial project load and surface failures in the sidebar#122
justinleveck wants to merge 1 commit into
chrkaatz:mainfrom
justinleveck:fix/retry-initial-project-load

Conversation

@justinleveck

Copy link
Copy Markdown

Summary

  • AppContext fetched projects/repositories exactly once on mount with no retry, and the resulting error state was never read by any component (confirmed by grepping every useApp() call site).
  • On a docker compose restart, the client's first request can beat the server to accepting connections - depends_on only orders container startup, it doesn't wait for readiness. That single failed fetch then silently stranded the user on an empty "No projects yet.", which reads exactly like lost data even though the server's persisted db.json was untouched the whole time. Creating a new project was the only thing that happened to trigger a fresh fetch (via handleAddProject's refreshData() call), which is why adding one "unlocked" the old data.
  • Retries the initial load up to 4 times with increasing backoff (1s, 2s, 3s) before giving up, and shows a Retry banner in the sidebar if it still fails, instead of a silent empty state.

Test plan

  • tsc -b, eslint, and full vitest suite (115/115) pass on client/
  • Manually verified in-browser: killed the server, reloaded - error banner with Retry appeared after retries exhausted; brought the server back up and confirmed a fresh page load auto-recovers within the retry window, and clicking Retry after the banner appears recovers immediately, restoring the previously "missing" project without needing to create a new one

AppContext fetched projects/repositories exactly once on mount with no
retry, and the resulting error state was never read by any component.
On a docker-compose restart, the client's first request can beat the
server to accepting connections (depends_on only orders container
startup, it doesn't wait for readiness) - that single failed fetch
then silently stranded the user on an empty "No projects yet.", which
reads exactly like lost data even though the server's persisted
db.json was untouched. Creating a new project was the only thing that
happened to trigger a fresh fetch, which is why it looked like adding
one "unlocked" the old data.

Retry the initial load up to 4 times with increasing backoff before
giving up, and show a dismissable-by-retry error banner in the sidebar
if it still fails, instead of a silent empty state.
@justinleveck
justinleveck force-pushed the fix/retry-initial-project-load branch from 6c1a80b to 04081a1 Compare August 7, 2026 02:53
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