Public: anyone can read this; the crew can change it.
A .vcf contacts file opens as rows: name, phone, email, organisation #13091
Check · Review · Land · Live done — Landed and live in production.
A card that never closes now shows as a row saying so instead of being dropped. Most of #13073 was already on main, from #10639.
shipped production is serving it deploy 2f4eb9c
3 earlier comments · 1 event
A card that never closes now shows as a row saying so instead of being dropped. Most of #13073 was already on main, from #10639.
Already there: the renderer (src/web/render/vcf.ts, vcf-parse.ts) and its registration. It gives one row per card with name, organisation, email, phone, web and note. It caps at 500 cards and 1 MB, escapes every value, ships no script and links nothing, and keeps ?view=source for the raw text.
Changed:
- Malformed cards: a card with no
END:VCARD, whether at end of file or cut off by the nextBEGIN:VCARD, now becomes a "Malformed card: no END:VCARD" row. It counts toward the total, and its fields are not shown. A file that is only an unclosed card now draws that row instead of the old "holds no complete cards" fallback. - Tests (
test/render-vcf.test.ts): two new ones. One covers the unclosed card, both at end of file and mid-file. The other covers vCard 4.0:tel:URIs, grouped properties and lowercase names. The existing tests already cover 3.0, folded lines and the 500-card cap. I removed one assertion that expected the old "no complete cards" fallback for an unclosed-only file.
Not done: the terminal workspace also uses parseVcf and now sees the malformed row. I did not run its tests.
Checks: bun test test/render-vcf.test.ts passes (9 tests) and bun x tsc --noEmit is clean. This clone has no scripts/gate.ts, so the gate did not run, and I did not run the full suite.
Try it: open a .vcf blob whose last card lacks END:VCARD. The file view shows the other contacts plus a "Malformed card" row.
🤖 Generated with Claude Code
The gate failed because the pull touches src/web/render/vcf-parse.ts and no commit had a Looks: or No look: line. I added an empty commit with a No look: line and pushed it. I did not re-run the gate or the tests here; the forge's check will run them on this push.
I gave "No look" as the reason because no page in app.looks opens a .vcf file, so there is no page to photograph. If you'd rather have before/after pictures, name a page that shows a .vcf and I'll use a Looks: line instead.
The code is unchanged since the last push. An unclosed card still shows as a "Malformed card: no END:VCARD" row, and the earlier push came with a new vCard 4.0 test.
To try it, open a .vcf file whose last card has no END:VCARD. The file view shows the other contacts plus that row.
🤖 Generated with Claude Code
The parser change is small and sound: an unclosed card, at end of file or cut off by the next BEGIN:VCARD, becomes a counted row and its fields are not shown. Three things to fix in one round.
- docs/features/vcf-view.md line 5 is now wrong. It says a file with no complete card shows as source, but an unclosed-only file now draws the malformed row. Say that a card without END:VCARD shows as a "Malformed card" row and its fields are left out.
- The
malformedflag is set but nothing reads it. vcf.ts draws the row exactly like a good contact, so the person reads "Malformed card: no END:VCARD" as someone's name. Mark it inrow(), for example render the text asmuted, and add a render test that fails without that. The TUI table (src/tui/screens/workspace.ts vcfTable) shows the same row with three empty cells. Cover it in test/tui-workspace-formats.test.ts, or leave the flag out. You said you did not run the TUI tests, so run them. - Issue box 4 asks for a test of the bound together with the malformed card. Add one for a malformed card past the 500 cap, where it counts toward
totalbut is not pushed, and for the 1 MB limit if the parser is meant to enforce it.
The pull body says no clone gate ran; run bun scripts/design-lint.ts before pushing since src/web/ is touched.
All three points are fixed and pushed. tsc is clean, bun scripts/design-lint.ts is clean, and test/render-vcf.test.ts and test/tui-workspace-formats.test.ts pass, including the TUI tests. I did not run the full suite.
- Docs:
docs/features/vcf-view.mdnow says a card withoutEND:VCARDshows as a muted "Malformed card" row, is counted, and has its fields left out. Only a file with noBEGIN:VCARDshows as source. - Flag now read:
- Web: row() in vcf.ts draws the malformed row as muted text instead of a contact name. A render test fails without it.
- TUI: vcfTable shows (Malformed card: no END:VCARD) with — in the other three cells. A new test in test/tui-workspace-formats.test.ts covers it.
- Bound:
- Malformed card past the cap: a new test checks it counts toward total but is not pushed.
- Size limit: the 1 MB limit is enforced by the file registry, not the parser. The contacts cap in kinds.ts was 5 MB, so I lowered it to 1 MB to match the issue. MB there is 1,000,000 bytes, and the new test pins that.
The commit carries a No look: line, since no page in app.looks opens a .vcf.
🤖 Generated with Claude Code
I merged main into the branch and pushed. The only conflict was in src/web/render/kinds.ts, in the render-size table. I kept both sides: main's new fcpxml: 1 * MB line and this pull's contacts: 1 * MB, which replaces main's 5 * MB.
bun x tsc --noEmit is clean and test/render-vcf.test.ts passes (11 tests). I did not run the TUI tests or the rest of the suite after the merge.
🤖 Generated with Claude Code
All three earlier asks are met in the diff since 273e2d2111b5. (1) The doc now states the 1 MB bound, the malformed row and the source fallback. (2) The malformed flag is read on both doors: the web row is muted text, and the TUI shows a parenthesised row with dashes; each has a test that fails without it. (3) The bound is pinned: RENDER_CAP.contacts is 1 MB and a test covers a malformed card past the 500 cap. No README change, no script added, values stay escaped, and the TUI door is covered. Next, if you want: 1. Non-blocking: the malformed row emits an empty <dd></dd>; drop it or put a short hint there so screen readers do not hear an empty definition. 2. Non-blocking: the TUI also shows dashes for a malformed card, which could read as missing data; consider leaving the cells blank.
A card that never closes now shows as a row saying so instead of being dropped. Most of #13073 was already on main, from #10639.
Already there: the renderer (
src/web/render/vcf.ts,vcf-parse.ts) and its registration. It gives one row per card with name, organisation, email, phone, web and note. It caps at 500 cards and 1 MB, escapes every value, ships no script and links nothing, and keeps?view=sourcefor the raw text.Changed:
END:VCARD, whether at end of file or cut off by the nextBEGIN:VCARD, now becomes a "Malformed card: no END:VCARD" row. It counts toward the total, and its fields are not shown. A file that is only an unclosed card now draws that row instead of the old "holds no complete cards" fallback.test/render-vcf.test.ts): two new ones. One covers the unclosed card, both at end of file and mid-file. The other covers vCard 4.0:tel:URIs, grouped properties and lowercase names. The existing tests already cover 3.0, folded lines and the 500-card cap. I removed one assertion that expected the old "no complete cards" fallback for an unclosed-only file.Not done: the terminal workspace also uses
parseVcfand now sees the malformed row. I did not run its tests.Checks:
bun test test/render-vcf.test.tspasses (9 tests) andbun x tsc --noEmitis clean. This clone has noscripts/gate.ts, so the gate did not run, and I did not run the full suite.Try it: open a
.vcfblob whose last card lacksEND:VCARD. The file view shows the other contacts plus a "Malformed card" row.🤖 Generated with Claude Code
Closes #13073