Skip to content

fix(app): clarify sync progress label as file count#132

Merged
graydawnc merged 1 commit intomainfrom
fix/sync-progress-label
Apr 30, 2026
Merged

fix(app): clarify sync progress label as file count#132
graydawnc merged 1 commit intomainfrom
fix/sync-progress-label

Conversation

@graydawnc
Copy link
Copy Markdown
Collaborator

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:

  • One session file can update an existing session (no new row).
  • One session file can yield no session (empty / unparseable / filtered).
  • Multiple files from different sources can dedupe against the same conversation.

How it connects

  • Only the ${''}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
  • e2e helper at ${''}helpers/launch.ts:69${''} still matches (regex looks for ${''}N sessions${''} after sync, not the in-flight label)
  • Manual: trigger sync, confirm ${''}Indexing N/M files${''} during the syncing phase

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.
@graydawnc graydawnc merged commit 6082981 into main Apr 30, 2026
4 checks passed
@graydawnc graydawnc deleted the fix/sync-progress-label branch April 30, 2026 05:31
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