Skip to content

fix(dashboard): name a partial last-copy download <stem>.partial.<ext> - #22643

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
kc-wt-14449
Oct 30, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
kc-wt-14449

Conversation

@dodgeblaster

@dodgeblaster dodgeblaster commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When you download the last surviving copy of a partial file from the side panel, the saved file keeps its real type.

Downloading a partial last-copy buffer saved it as release-checklist.md.partial. The OS reads a file by its trailing extension, so a .partial tail makes the download an unknown type — a Markdown file no longer opens as Markdown.

Why it matters

The side panel offers this download when a file was deleted on disk and the buffer is the only copy left — the one moment the copy must be easy to keep and reopen. A name that breaks the file association defeats that: the user saves their only copy and then cannot open it in the right app.

Not a goal

What changed (motivation → approach → change)

A partial download was named by appending .partial after the whole filename, which left the extension buried mid-name where the OS cannot see it. The fix moves the tag before the extension, so notes.md saves as notes.partial.md and still opens as Markdown. A new partialDownloadName helper in fileReadUrl.ts inserts the tag before the last extension, and appends it when there is nothing to preserve — a name with no extension, a dotfile whose leading dot is not an extension separator, or a trailing-dot name. The side panel's last-copy download in useMarkdownPanelDisk.ts calls it for a partial buffer and the plain download name for a whole one; the partial-prop comment in MarkdownPanel.tsx and the module spec docs/system-specs/modules/learn-cron-dashboard.md are updated to match.

Backwards compatibility

Compatible: this only changes the suggested filename of a browser download; no stored data, API, or contract changes.

Removes nothing: no capability, path, record, or key is removed — a download that was named name.ext.partial is now named name.partial.ext.

Tests

  • partialDownloadName unit tests (fileReadUrl.test.ts): tag goes before the extension (release-checklist.partial.md), before the last extension of a multi-dot name (archive.tar.partial.gz), appended when there is no extension (Makefile.partial, hosts.partial), a leading dot treated as a dotfile marker not an extension (.env.partial), and a trailing-dot name (weird..partial).
  • MarkdownPanel.watchVisibleTab.test.tsx updated: the partial last-copy download (banner and dialog rescue) now lands as b.partial.md, a whole copy stays b.md.

Manual verification

N/A — unit coverage sufficient; the change is the string a download lands under, pinned by the tests above.

Screenshots / video

Why no screenshot: No rendered surface changes — the only user-visible delta is the suggested filename of a browser download, which has no on-screen pixels.

Related Issues

Part of #14449

Pattern harvest

Not generalizable: a one-off naming fix for one download site; .partial before the extension is specific to this last-copy rescue.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of b6869bb0f8496d24417286b728ea5176e43e7144 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: a narrow filename fix with a pure helper and a matching spec update. No recorded decision fixes the old <file>.partial name.

[DESIGN-REVIEWED] b6869bb

Description read

[DESCRIPTION-READ] 2a8775fa5a90297fac82693e4a13835b2b05f6ac09880b28e22f04e8408560bb

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of b6869bb0f8496d24417286b728ea5176e43e7144 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: the diff changes no on-screen control, label or state. The only change is the suggested filename of a download (notes.partial.md instead of notes.md.partial), so no screenshot is needed.

[UX-REVIEWED] b6869bb

Description read

[DESCRIPTION-READ] e4406238ec4d897c6b6337d4a0dcf0fd269b6e412cd42d0fc3dfe13f5d46309c

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of b6869bb0f8496d24417286b728ea5176e43e7144 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

This is a fix to one download name, and every item in it earns its place.

Notes

  • Item 2: inherited. The stem/extension split rule ("a leading dot is a dotfile marker") already exists in extensionOf (website/src/lib/artifactImport.ts:84) and extOf (website/src/apps/file-explorer/utils.ts:7). Both return only the lowercased extension, so neither can rebuild the name. That makes this a third copy of the split rule, not of the capability. Subtraction: none smaller.

What this change ships

Inventory (4 items) — 4 justified

Intent: when you save the only copy left of a partly-read file, it should still open in the right app. This is a FIX (part of #14449).

  1. A partial last-copy download is now named notes.partial.md instead of notes.md.partial. — justified
  2. New exported helper partialDownloadName (1 consumer, useMarkdownPanelDisk.ts). — justified
  3. The test that pinned b.md.partial now expects b.partial.md, and the description says why. — justified
  4. The spec line and code comments describe the new name. — justified

[FIRST-PRINCIPLES-REVIEWED] b6869bb

Description read

[DESCRIPTION-READ] 859d0d4da5b57b572c854f32e3d3bc2abf42b5f990d9c00858e06b634f85afe6

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed b6869bb0f8496d24417286b728ea5176e43e7144 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] b6869bb

Verdict parsed from the review's SHA-scoped output markers for commit b6869bb0f8496d24417286b728ea5176e43e7144.

False positive or not applicable? A repository writer can comment:
/ai-review override fable b6869bb0f8496d24417286b728ea5176e43e7144 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of b6869bb0f8496d24417286b728ea5176e43e7144 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b6869bb

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b6869bb0f8496d24417286b728ea5176e43e7144 false-positive: <reason, 20 to 500 characters>

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

self-added: no

  • span=548389a1e430 — spec still says <file>.partial

fixed in 52b35b7: updated the owning line in docs/system-specs/modules/learn-cron-dashboard.md (File read headers) to describe the new name — a .partial tag before the extension (notes.partial.md), so the OS keeps the file's type — matching the partialDownloadName helper. The spec and the code now agree.

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Frontend Tests (1) is red on head 8d332d6 because of src/test/kiroUsageRefetchInterval.test.ts > maps an explicit unavailable answer to a terminal sentinel (expected 'none' to be 'api-key'). This PR does not touch that test or website/src/api/kiroUsage.ts.

It is a main red: it fails the same way locally on origin/main 7e09632. Main's own push CI misses it because it runs only an affected subset (421 of 885 test files). It is tracked by #25941, and the fix is #25944. When #25944 merges, this PR will be rebased onto it.

@dodgeblaster
dodgeblaster marked this pull request as ready for review October 30, 2026 00:15
@dodgeblaster
dodgeblaster requested review from a team and KiroCrewCaptain as code owners October 30, 2026 00:15
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 30, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 30, 2026 01:08

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tier 1 auto-approve: fix (6 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: a partial last-copy download is named .partial. so the OS keeps the file type, with tests. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/learn-cron-dashboard.md.

@KiroCrewCaptain
KiroCrewCaptain merged commit f90fa38 into main Oct 30, 2026
97 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the kc-wt-14449 branch October 30, 2026 01:09
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 30, 2026
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.

2 participants