Skip to content

Say sessions processed, not uploaded, in the import status - #1886

Merged
realtonyyoung merged 5 commits into
mainfrom
claude-tyoung/session-import-message-wording-732077
Oct 23, 2026
Merged

realtonyyoung merged 5 commits into
mainfrom
claude-tyoung/session-import-message-wording-732077

Conversation

@realtonyyoung

@realtonyyoung realtonyyoung commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1885 — AI-4337

What & why

The desktop app's history import status line said "N sessions uploaded". On a local install nothing leaves the machine, so it now says "N sessions processed", counting every settled session (imported, skipped or failed) and reconciled from each pass's totals line. The onboarding copy that a local install sees says "import" rather than "upload" for the same reason; the remote wording is unchanged.

Verification

HistoryImportRunTests (new) and DoneStepViewModelTests: 9/9 pass locally.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • User Interface
    • Import status messages now report the number of sessions processed, including when an import fails or is cancelled.
    • Onboarding messages use import terminology instead of upload terminology where appropriate.
    • The onboarding introduction describes local imports when a local path is selected.
  • Bug Fixes
    • Import progress now accounts for imported, skipped, and failed sessions in the final totals.

A local install never sends sessions off the machine, so uploaded read as a broken promise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: acc7b009-db79-4d2e-a0cf-9810a389896a
📥 Commits

Reviewing files that changed from the base of the PR and between 32fc686 and 06a14dc.

📒 Files selected for processing: 6
  • src/Capacitor.App/ViewModels/MainWindowViewModel.cs
  • src/Capacitor.App/ViewModels/Onboarding/DoneStepViewModel.cs
  • src/Capacitor.App/ViewModels/Onboarding/HistoryImportRun.cs
  • src/Capacitor.App/ViewModels/Onboarding/HistoryStepViewModel.cs
  • test/Capacitor.App.Tests.Unit/DoneStepViewModelTests.cs
  • test/Capacitor.App.Tests.Unit/HistoryStepViewModelTests.cs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The import run now reconciles processed session counts with totals output. The status and onboarding text use processed or imported wording instead of uploaded wording where applicable.

Changes: History import status and accounting

Layer / File(s) Summary
Processed session accounting
src/Capacitor.App/ViewModels/Onboarding/HistoryImportRun.cs, test/Capacitor.App.Tests.Unit/HistoryImportRunTests.cs, test/Capacitor.App.Tests.Unit/HistoryStepViewModelTests.cs
The run reconciles per-session results with imported, skipped, and failed totals. Tests check the resulting processed counts.
Status and onboarding wording
src/Capacitor.App/ViewModels/MainWindowViewModel.cs, src/Capacitor.App/ViewModels/Onboarding/HistoryStepViewModel.cs, src/Capacitor.App/ViewModels/Onboarding/DoneStepViewModel.cs, test/Capacitor.App.Tests.Unit/DoneStepViewModelTests.cs
The status uses the processed count. Onboarding text uses import wording, with local-path-specific text in HistoryStepViewModel. The failure-title test expects the updated wording.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

  • kurrent-io/kcap-cli#1815 — The PR updates history-import status wording, but does not address the issue’s banner and dismissal behavior.
  • kurrent-io/kcap-cli#1830 — The PR reconciles totals-based processed counts, but does not add per-session live progress.

Possibly related PRs

Suggested reviewers: alexeyzimarev

Merge Risk: 🔵 Low · up to 06a14

Import status can overstate processed sessions in this narrow case; the coordinated CLI and app correction can follow up without blocking typical imports.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Out of Scope Changes check Warning The DoneStepViewModel wording changes are not conditioned on the local path, so they change remote onboarding copy. The PR description states that remote wording is unchanged, and #1885 covers only … Limit the DoneStepViewModel changes to the local path. In Lede, keep the existing "No sessions were uploaded." text for remote installs and use the new wording only when _current.Local is true. In FailedTitle, keep "failed to upload…
Docstring Coverage Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change from “uploaded” to “processed” in the import status. It is concise and specific.
Linked Issues check Passed Issue #1885 requires the history import status line to say "processed" instead of "uploaded" in the running, unfinished, and done states. At the reviewed head, `MainWindowViewModel.HistoryImportStatus…
Full details: Linked Issues check

Explanation

Issue #1885 requires the history import status line to say "processed" instead of "uploaded" in the running, unfinished, and done states. At the reviewed head, MainWindowViewModel.HistoryImportStatus uses run.Processed with "sessions processed" in all three branches (running, failed or cancelled, and completed). The WhenActivated subscription now observes Processed, so the status line refreshes when the count changes. The count is now settled from per-pass totals in HistoryImportRun; HistoryImportRunTests.The_totals_line_settles_the_processed_count covers that behavior. The wording requirement is met. Scope note: the issue does not ask for the count semantics to change, so the count reconciliation is evaluated under the out-of-scope assessment. The HistoryImportRun internals were taken from the summary and were not re-read in full. Test execution was not run by this review.

Full details: Out of Scope Changes check

Explanation

The DoneStepViewModel wording changes are not conditioned on the local path, so they change remote onboarding copy. The PR description states that remote wording is unchanged, and #1885 covers only the history import status line. At head, the Lede fallback changes "No sessions were uploaded." to "No sessions were imported." for any install with a non-null Import that has zero imported sessions and is not running. The FailedTitle property changes "failed to upload" to "failed to import" for all installs, with no Local check. This is the same concern raised in the previous review, and the head diff confirms it is unresolved. The HistoryImportRun reconciliation also changes the displayed number from imported-only to processed (imported, skipped, and failed). That behavior is tied to the PR description's "processed" intent, so it is not treated as a demonstrated unrelated change. It is a semantic change beyond the wording-only request in #1885, and the author should confirm it is intended.

Resolution

Limit the DoneStepViewModel changes to the local path. In Lede, keep the existing "No sessions were uploaded." text for remote installs and use the new wording only when _current.Local is true. In FailedTitle, keep "failed to upload" for remote installs and use "failed to import" only for local installs, or add explicit local and remote branches. Update DoneStepViewModelTests so the remote case asserts the original wording and the local case asserts the new wording. Confirm with the author whether the processed-count reconciliation in HistoryImportRun should stay in this PR, since #1885 requests wording only.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

realtonyyoung and others added 2 commits October 23, 2026 10:53
The status line now counts every settled session, so the number matches the word.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realtonyyoung
realtonyyoung marked this pull request as ready for review October 23, 2026 15:12
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Show processed sessions in history import status

🐞 Bug fix ✨ Enhancement 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Replace “uploaded” with “processed” in import status and count imported, skipped, and failed
 sessions.
• Reconcile live counts against each import pass’s totals, including sessions without individual
 output lines.
• Use import wording for local onboarding while retaining the remote history-page wording.
Diagram

graph TD
  CLI["CLI import output"] --> Run["History import run"] --> Main["Main window model"] --> Status["Status line"]
  Run --> Done["Completion page"]
  Mode["Local path"] --> History["History page"]
  Mode --> Done
Loading
High-Level Assessment

Keep the live processed count and reconcile it from each pass’s authoritative totals. Counting only final totals would lose live progress; counting only session lines would miss sessions without individual output.

Files changed (6) +55 / -19

Enhancement (2) +7 / -5
DoneStepViewModel.csName completed and failed outcomes as imports +2/-2

Name completed and failed outcomes as imports

• The no-sessions message and failed-session title use “imported” and “failed to import” instead of upload wording.

src/Capacitor.App/ViewModels/Onboarding/DoneStepViewModel.cs

HistoryStepViewModel.csDescribe local history transfer as an import +5/-3

Describe local history transfer as an import

• The history-page introduction now says transcripts are imported and stay on the machine for local setup. Remote setup retains its existing upload wording.

src/Capacitor.App/ViewModels/Onboarding/HistoryStepViewModel.cs

Bug fix (2) +18 / -12
MainWindowViewModel.csDisplay processed sessions in import status +4/-4

Display processed sessions in import status

• Running, completed, and interrupted status messages now show processed rather than uploaded sessions. The status observes Processed changes so it refreshes as sessions settle.

src/Capacitor.App/ViewModels/MainWindowViewModel.cs

HistoryImportRun.csReconcile processed counts for each import pass +14/-8

Reconcile processed counts for each import pass

• Tracks live processed sessions per pass, then adjusts the run total using imported, skipped, and failed values from that pass’s closing line. Resets the per-pass count before the next pass, including when a pass ends without totals.

src/Capacitor.App/ViewModels/Onboarding/HistoryImportRun.cs

Tests (2) +30 / -2
DoneStepViewModelTests.csAssert revised failed-import wording +2/-2

Assert revised failed-import wording

• Renames the failure-copy test and updates its expected title to say sessions failed to import.

test/Capacitor.App.Tests.Unit/DoneStepViewModelTests.cs

HistoryImportRunTests.csTest processed-count reconciliation +28/-0

Test processed-count reconciliation

• Adds a test where individual session lines cover only part of the closing totals, asserting that all eight settled sessions are processed without double-counting.

test/Capacitor.App.Tests.Unit/HistoryImportRunTests.cs

@qodo-code-review

qodo-code-review Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. The import counting test now fails ✓ Resolved
Description
HistoryImportRun.OnLine now reconciles Processed to all three totals for each pass, but
The_run_counts_sessions_as_they_land still expects 12. That test starts two passes and supplies `3
imported · 2 skipped · 3 failed` for each, so the completed run now has 16 processed sessions and
the assertion fails.
Code

src/Capacitor.App/ViewModels/Onboarding/HistoryImportRun.cs[122]

+            Processed      = Add(Processed, (long)imported + skipped + failed - _passProcessed);
Relevance

●●● Strong

Stale assertion conflicts with intentional processed-count reconciliation across two passes; update
expected total to 16.

PR-#1832

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The fixture selects one private repository alongside the default shared repositories, producing two
passes. Its fake CLI returns totals of eight sessions for every pass; the new reconciliation applies
those totals to both passes, while the unchanged assertion expects 12.

src/Capacitor.App/ViewModels/Onboarding/HistoryStepViewModel.cs[312-329]
test/Capacitor.App.Tests.Unit/HistoryStepViewModelTests.cs[173-213]
src/Capacitor.App/ViewModels/Onboarding/HistoryImportRun.cs[114-125]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
An existing import test expects 12 processed sessions, but the new totals reconciliation correctly counts 16 across its two passes.
## Fix Focus Areas
- test/Capacitor.App.Tests.Unit/HistoryStepViewModelTests.cs[173-213]
## Recommended Fix
Update the processed-count assertion to 16 while preserving the test's live-count assertions.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
⚠️ Tickets: not configured — No jira, linear integration is connected for the linked tickets
✅ Compliance rules (platform): 59 rules
✅ Cross-repo context — repo relationships
Review mode: Auto: ⚖️ Balanced: Behavioral import-count reconciliation and local/remote wording changes carry genuine logic risk.

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread src/Capacitor.App/ViewModels/Onboarding/HistoryImportRun.cs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 23, 2026
realtonyyoung and others added 2 commits October 23, 2026 11:26
…-import-message-wording-732077

# Conflicts:
#	test/Capacitor.App.Tests.Unit/DoneStepViewModelTests.cs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realtonyyoung
realtonyyoung merged commit 87dde43 into main Oct 23, 2026
13 checks passed
@realtonyyoung
realtonyyoung deleted the claude-tyoung/session-import-message-wording-732077 branch October 23, 2026 16:00
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.

Say sessions processed, not uploaded, in the history import status

1 participant