fix(components): let the Code Collab file index retry after a failure - #4
Draft
pythonlearner1025 wants to merge 1 commit into
Draft
fix(components): let the Code Collab file index retry after a failure#4pythonlearner1025 wants to merge 1 commit into
pythonlearner1025 wants to merge 1 commit into
Conversation
Once the file-index acquisition fails, "Files unavailable" is terminal. The
effect keys on `{cache, flockDocId, loadLocalSnapshot, prepareTarget}` and a
reconnect changes none of them, so it never runs again; closing and reopening the
panel restores the whole tree, which shows only the effect is stuck. The panel
offers no way out either: the `Try again` action exists on the `local-error`
branch and on no other.
- `useCodeCollabFileIndexLoadState` takes a `reloadNonce`, joined into the
existing `requestKey`, so bumping it re-runs the acquisition exactly as a
changed cache or doc id would.
- `useCodeCollabSessionFileProvider` returns `reload`, and re-arms itself on an
offline -> online transition of the owning machine. A transition, never a
status: "retry while the status is error" loops for ever against a machine that
is online and answering errors, while an edge fires at most once per outage.
- `FileTreeView` takes `onProviderRetry` and gives the provider-unavailable panel
the same `RefreshCw` + `sessions.codeSession.files.retry` action the
`local-error` panel already draws. Callers that pass nothing see no button.
- `SessionDetail` passes the provider's `reload`.
Model: claude-opus-5[1m]
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.
Once the file-index acquisition fails, "Files unavailable" is terminal. The
effect keys on
{cache, flockDocId, loadLocalSnapshot, prepareTarget}and areconnect changes none of them, so it never runs again; closing and reopening the
panel restores the whole tree, which shows only the effect is stuck. The panel
offers no way out either: the
Try againaction exists on thelocal-errorbranch and on no other.
useCodeCollabFileIndexLoadStatetakes areloadNonce, joined into theexisting
requestKey, so bumping it re-runs the acquisition exactly as achanged cache or doc id would.
useCodeCollabSessionFileProviderreturnsreload, and re-arms itself on anoffline -> online transition of the owning machine. A transition, never a
status: "retry while the status is error" loops for ever against a machine that
is online and answering errors, while an edge fires at most once per outage.
FileTreeViewtakesonProviderRetryand gives the provider-unavailable panelthe same
RefreshCw+sessions.codeSession.files.retryaction thelocal-errorpanel already draws. Callers that pass nothing see no button.SessionDetailpasses the provider'sreload.Compatibility
Every change is additive at its default. With the new prop, parameter or flag
absent, the touched components render and behave exactly as they do today, and
no existing call site in this repository passes one.
Testing
packages/componentstypecheck and the full vitest suite pass. No new test: the acquisition effect needs a runtime and a Flock document. The offline→online re-arm is the part most worth a test and is the one that needs the most scaffolding; happy to add it if you point at the harness you would want it in.Notes for the reviewer
The re-arm fires on a TRANSITION, never on a status: "retry while the status is error" loops for ever against a machine that is online and answering errors.
Review metadata
BlitzOS fork only. Delete this section before sending the PR to
LodyAI/Lody.blitz/seam-10-file-index-retryf3474894 (the pinned upstream commit)