Skip to content

cleanup(android): drop unreachable CsvImportPayload.Ignore arm - #1335

Merged
9thLevelSoftware merged 1 commit into
mainfrom
cursor/csv-import-drop-unreachable-ignore-1023
Oct 23, 2026
Merged

9thLevelSoftware merged 1 commit into
mainfrom
cursor/csv-import-drop-unreachable-ignore-1023

Conversation

@9thLevelSoftware

Copy link
Copy Markdown
Owner

onCreate returns immediately for CsvImportPayload.Ignore, so the later when arm for that case could not run. This drops only that arm. The sealed when stays exhaustive after the early return.

File:

  • androidApp/src/main/kotlin/com/devil/phoenixproject/csv/CsvImportActivity.kt

Verification:
./gradlew :shared:compileKotlinIosSimulatorArm64 -Pskip.supabase.check=true :shared:compileAndroidHostTest :androidApp:compileDebugKotlin

Result: BUILD SUCCESSFUL in 4m 13s.

Open in Web Open in Cursor 

onCreate already returns when the payload is Ignore, so the later when arm could not run.

Co-authored-by: Devil <9thLevelSoftware@users.noreply.github.com>
@9thLevelSoftware
9thLevelSoftware marked this pull request as ready for review October 23, 2026 14:31
Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kilo-code-bot

kilo-code-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Merge (suggestion is optional)

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
androidApp/src/main/kotlin/com/devil/phoenixproject/csv/CsvImportActivity.kt 58 Removing the dead Ignore arm also removes the sealed exhaustiveness net: a CsvImportPayload subtype added later would match no branch and be silently dropped (trampoline neither delivers nor finishes). Optional: fail-safe else branch or restore the arm.

Verdict

Approve — the removed arm was unreachable (onCreate returns for Ignore before the when), so this is a behaviour-preserving deletion.

Correctness / Safety Findings

No correctness or safety findings.

Verified against the current HEAD (a86f593): CsvImportActivity.onCreate returns at line 39-42 when payload == CsvImportPayload.Ignore (a data object, so == is identity), therefore the deleted Ignore branch could never run and the delivery result is unchanged. Ignore is produced only by CsvImportIntentClassifier (phoenix:// non-import links) and AndroidCsvImportIntake.describe never returns it for a malformed intent (that maps to Unreadable). The remaining arms map 1:1 onto CsvImportPayload, and the Unreadable -> deliver(..., Unreadable) mapping keeps the documented "nothing readable was delivered" contract.

Ponytail Review

Ponytail: Lean already. Ship.

This PR is itself the Ponytail win: one unreachable branch deleted, no new abstraction, dependency, config, or test scaffold, and the Ignore early return (which must stay ahead of inbox.tryBegin) stays the single place that decides Ignore. Nothing further in the changed lines can be cut.

Ponytail net: 0 lines.

Suggested Minimal Patch

No patch needed. The only optional change is one line in CsvImportActivity.kt — else -> deliver(deliveryId, CsvImportDeliveryResult.Unreadable) — if the author wants to keep a fail-safe for future payload subtypes.

Final Merge Guidance

Can merge; the SUGGESTION is optional cleanup and does not block.

Fix these issues in Kilo Cloud

Files Reviewed (1 file)
  • androidApp/src/main/kotlin/com/devil/phoenixproject/csv/CsvImportActivity.kt - 1 issue

Reviewed by minimax-m3 · Input: 62.8K · Output: 22.3K · Cached: 978.7K

Review guidance: REVIEW.md from base branch main

@9thLevelSoftware
9thLevelSoftware merged commit 5d67507 into main Oct 23, 2026
17 of 18 checks passed
@9thLevelSoftware
9thLevelSoftware deleted the cursor/csv-import-drop-unreachable-ignore-1023 branch October 23, 2026 16: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.

3 participants