fix(app): clarify sync progress label as file count#132
Merged
Conversation
The sidebar status text during the syncing phase read "Indexing 540/616",
which read as session count and looked wrong against the post-sync total
(e.g. ending at "422 sessions"). The numerator and denominator are
actually the count of session files being processed: one file may
update an existing session, parse to no session, or be deduped against
another source's transcript, so the file count is structurally larger
than the final session count.
Append "files" to disambiguate. The next phase ("Building index…") and
the post-sync total are unchanged.
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.
What
Change the sidebar sync status text during the ${'
'}syncing${''} phase from ${''}Indexing N/M${''} to ${''}Indexing N/M files${''}.Why
The numerator/denominator come from ${'
'}pendingFiles.length${''} in the syncer (count of session files whose mtime differs from the indexed mtime), but the label read as session count. The post-sync total then comes from a different query (${''}SELECT COUNT(*) FROM sessions${''}), so users saw "Indexing 540/616" mid-sync settle to "422 sessions · now" and assumed the indexer dropped sessions.The two numbers are not comparable by design:
How it connects
'}getSyncStatusText${''} branch for ${''}phase === 'syncing'${''} changes. Other phases (${''}Scanning…${''}, ${''}Building index…${''}, post-sync total) are unchanged.'}components/StatusBar.tsx${''} has a similar string but is no longer mounted anywhere; left untouched here, should be cleaned up as a separate dead-code removal.Test plan
'}pnpm exec tsc -p packages/app/tsconfig.json --noEmit${''} clean'}pnpm --filter @spool/app exec vitest run src/${''} — 12/12 pass'}helpers/launch.ts:69${''} still matches (regex looks for ${''}N sessions${''} after sync, not the in-flight label)'}Indexing N/M files${''} during the syncing phase