Skip to content

fix(portal): descriptions starting with .NET no longer show as No description - #353

Merged
allisonmahmood merged 2 commits into
mainfrom
fix/335-portal-dotnet-description
Sep 24, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
fix/335-portal-dotnet-description

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

A patch described as ".NET release health and deployment notes" showed "No description" in the portal index, while its card showed the full text. The index cut the description at every period, so a leading period left an empty line, and a period inside a word such as "1.2" cut the line short.

A period now ends the index line only when a space or the end of the text follows it. Semicolons, spaced dashes and the 80-character limit work as before.

Closes #335

Test evidence

  • Added .NET release health and deployment notes and Track release 1.2 rollouts to the index-description test in PortalPages.test.ts. Before the fix it failed with expected 'leading-period No description' to include '.NET release health…'. It passes now, and so do the existing period, semicolon, dash, length and blank cases (49/49 in the file).
  • pnpm typecheck and pnpm lint pass.
  • pnpm test: 940 passed, 2 failed. Both failures were 5-second timeouts in packages/integrations (postgres/Operations.test.ts, postgres/Runtime.test.ts), plus a PGlite ErrnoError 44. Both files pass when run on their own (9/9). That package doesn't depend on the portal.

Implemented by Claude Opus 5.5 via Claude Code (foreman run orchestrated by Claude Fable 5.1).

…escription

The index cut descriptions at every period, so a leading or token-internal
period (".NET", "1.2") ended the clause early or left it empty. A period now
ends a clause only when whitespace or the end of the text follows it.

Closes #335

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added area:ui Portal and first-party browser pages, shared rendering and styles size:s Under 100 changed lines labels Sep 23, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Astra review

Reviewed commit 248d62a3e60cccb04e5d9a4795f1463e644cd9f7 with git diff origin/main...HEAD, against issue #335. One pass, no subagents; merge blockers only.

Standards

No merge-blocking method or YAGNI findings. The change fixes the existing shared firstClause helper with a generic punctuation rule, without a .NET special case, new abstraction, or unrelated behavior. The regression cases reuse the existing real-handler test.

Spec

No merge-blocking intent findings. Leading and token-internal periods remain part of the description. Sentence-ending periods, semicolons, spaced en dashes, and the existing 80-code-point bound are preserved. Root and card pages use the same index renderer, including Yours, Company, and visible retired/deleted entries. No scope creep found.

Verification: pnpm exec vitest run packages/portal/src/PortalPages.test.ts -t "shows only a distinct secondary title and cuts only index descriptions" passed: 1 test passed, 48 skipped. This exercises the new .NET and 1.2 cases alongside the existing punctuation, length, and blank-description controls. I did not rerun the full suite.

Summary: Standards 0 blockers; Spec 0 blockers. No blocking issue in either axis.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Standards

Standards is clean for this diff. No documented-standard breach, and none of the baseline smells show up.

firstClause in packages/portal/src/render.ts. The regex is the smallest contract for the rule this PR states. A period is a boundary only before whitespace or the end of the string, so .NET and 1.2 stay intact. indexGroup still turns an empty clause into No description. The diff leaves that default alone. The new comment records the boundary and the existing 80-code-point cap. The ui-consistency skill asks for the smallest durable contract, and this meets it. Its render.test.ts rule applies when rendered structure, escaping, or defaulting logic changes. This hunk changes where the line is cut. Markup, escaping, and the empty-clause default stay as they were. CLAUDE.md's smallest-model rule is met. No new abstraction.

packages/portal/src/PortalPages.test.ts. The two cases sit in the socket test that already owns index-clause cuts, and they assert the full description on the index link. That matches CLAUDE.md's "tests should be focused" without a new harness.

No Effect service findings. The diff does not create, move, refactor, or consume an Effect service.

No UI consistency findings.

Spec

The issue's intent is what landed.

(a) Nothing missing. firstClause is still the only producer of the index line, and indexGroup is its only caller. renderIndex passes Yours, Company, and Retired and deleted through that one function, so the leading-period fix covers all three. descriptionBlock and the description textarea still render the stored string. Version and retire-confirmation pages do not call firstClause. The 80-code-point bound, the semicolon, and the spaced en dash stay as they were. There is no .NET special case. The diff is display-only.

(b) No scope creep. Treating 1.2 the same way as .NET is the general rule the issue asked for: "do not add a .NET-specific exception." The new tests cover those two index lines. The card, editor, version page, and retire confirmation are untouched.

(c) Nothing implemented incorrectly. \.(?=\s|$) ends a clause only when whitespace or the end follows, which stops a token-internal period from becoming an empty slice and then No description. A sentence period followed by a space still cuts, including Dr. Smith. Hello... keeping Hello.., and a period before ) or a quote no longer cutting, are that same rule. That matches "Recognize clause-ending punctuation without treating a token-internal leading period as an empty description. Preserve the existing 80-code-point bound and punctuation controls."

Method

I ran the old search /\.|;| – /u and the new search /\.(?=\s|$)|;| – /u through the same trim, slice, and 80-code-point cap.

The lookahead is the rule in the PR body. A period counts only when whitespace or the end of the trimmed string follows. A semicolon or a spaced en dash still wins when it comes first. The cap still runs after the cut. In JavaScript, search returns a UTF-16 index, the lookahead is zero-width so the slice stays aligned, and $ without the m flag is the end of the string.

Strings the issue is about:

input before after
.NET release health and deployment notes empty, shown as No description the full description
.NET. empty .NET
Track release 1.2 rollouts Track release 1 the full description
See v1.2. Next See v1 See v1.2
1.2; more detail 1 1.2

Controls that stay put: Find a desk. Keep the second sentence on the card. is still Find a desk. Semicolon, spaced en dash, a blank description, and 81 a characters still cut as before. Dr. Smith is here is still Dr.

Same rule on strings the issue did not name:

input before after
Hello... and Hello... world Hello Hello..
She said "Hi." then left She said "Hi the whole string
Ends here.) More Ends here the whole string

A walk over code points would state the same rule. firstClause is already one search, so the lookahead is the change to land. A sentence segmenter would reopen abbreviations and quotes, which the issue said to leave in place. A .NET branch is what the issue forbids, and it would still cut 1.2.

What the rule still does: Hello... shows as Hello... A period stuck to a quote or a closing paren does not end the line. A description that is only a period and a space is still empty, and the index still says No description.

YAGNI

This is the smallest change that fixes both examples. The new pattern is the old alternation plus a guard on the period. The match is still only the period, so the slice below it is unchanged.

Nothing extra was added. No tokenizer, no sentence library, no .NET branch, no new type, no new export. firstClause stays private.

The comment earns its place. It is the only note that a period inside a token is not a boundary. Without that sentence, changing the search back to /\./ looks like a cleanup.

The tests are the right size for this file. firstClause is not exported, and the existing cut cases already publish a patch and read cardLinks. Those neighbours assert that the index line does not contain the full description, so the new rows cannot join that loop. cardLinks reads only the index aside, so the card body cannot make assert.include(line, description) pass. .NET release health... fails the old regex. Track release 1.2 rollouts fails a fix that only special-cases .NET. The two rows are enough. A punctuation matrix, a stored-row check, or a card assertion on these strings would repeat locks this file already has.

Keep the lookahead, the token sentence in the comment, and both new cases.

Standards: 0 findings. Spec: 0 findings.

Reviewed by Grok 4.7 in Grok Build. Separate passes covered standards, the issue, the punctuation method, YAGNI, and the tests.

With the period rule from the previous commit, "Wait for it... then" showed as
"Wait for it.." in the index. A run of periods before whitespace or the end
now ends the clause as one boundary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Both reviews (Astra, Grok) came back with 0 blockers.

Fixed: Grok's method table showed that Hello... world now showed as Hello.. in the index. It used to show Hello, so this PR introduced it. In d728c36 a run of periods before whitespace or the end now counts as one boundary (/\.+(?=\s|$)|;| – /u). I added an ellipsis-cut case. The cut cases now check the exact index line instead of a substring, because the substring check could not catch a trailing ... The test failed before the change and passes after it.

Kept as is:

  • Dr. Smith still cuts at Dr: the old code did the same, and the issue said to keep the existing punctuation rules.
  • A period right before a quote or ) no longer ends the line: under the rule the issue asked for, only a period followed by a space or the end of the text counts.
  • A description that is only . still shows No description: it has no text, so that is correct.

Evidence on d728c36: PortalPages.test.ts passes 49/49. pnpm typecheck and pnpm lint pass. CI passes on d728c36: lint, test (22), test (24), cli-smoke, clerk-live, postgres-concurrency, dependency-review and label. My local pnpm test failures were all timeouts in packages/patchy and packages/integrations with the machine's load average around 9. Those 4 files pass on their own (219/219) and in CI.

@allisonmahmood
allisonmahmood merged commit 3738f5c into main Sep 24, 2026
8 checks passed
@allisonmahmood
allisonmahmood deleted the fix/335-portal-dotnet-description branch September 24, 2026 13:11
allisonmahmood added a commit that referenced this pull request Sep 24, 2026
…n cleanup (#355)

On the filesystem store, if a file was deleted after the listing had enumerated it but before its stat, the whole listing failed with `StoreUnavailable`. OrphanSweep then abandoned the pass, leaving unrelated reclaimable objects until a later sweep. Closes #337.

`walk` now skips an entry whose `stat` returns `ENOENT`. Other stat errors, such as permission or I/O failures, still fail the listing, and iteration stays lazy. The `list` doc comment now says a listing is not a snapshot.

Stacked on #353 (branch fix/335-portal-dotnet-description).

**Test evidence**
- New test in `FilesystemContentStore.test.ts`: five files in one directory, list lazily, delete three after the first entry is returned. It failed before the fix with `ENOENT: ... stat` wrapped as `StoreUnavailable`. It now returns the first entry and the remaining file.
- `pnpm typecheck` and `pnpm lint` pass.
- `pnpm test`: 941 passed, 2 timed out in `packages/integrations` Postgres tests under machine load. Both files pass when re-run alone (9/9).

Implemented by Claude Opus 5.5 via Claude Code (foreman run orchestrated by Claude Fable 5.1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui Portal and first-party browser pages, shared rendering and styles size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

portal: a description beginning with .NET appears as No description

1 participant