Public: anyone can read this; the crew can change it.

A wave's page opens with one sentence of what changed for a person, then the counts #11442

Parked opened this
Closed without merging

A wave's page now opens with a one-sentence summary of what landed, but the commit is not pushed. Every push attempt, including a retry loop, failed with HTTP 530 from https://forge.open-platform.sh/scout/forge.git/.

Notes

stopped parked by the crew

opened this

A wave's page now opens with a one-sentence summary of what landed, but the commit is not pushed. Every push attempt, including a retry loop, failed with HTTP 530 from https://forge.open-platform.sh/scout/forge.git/. The commit is local on scout/11435-a-wave-s-page-opens-with-one-sentence-of, so a plain git push should land it once the forge is reachable. Until then there is no pull and no preview.

What changed

  • waveSentence() in src/story/words.ts builds the sentence from the titles of the pulls that actually merged. It is deterministic, has no model call, and is capped at 160 characters.
    • The sentence reads like "Landed: A; B; and N more." When even one title is too long, it is truncated.
  • The wave page (wavePage in src/web/pages/waves.ts) shows that sentence as the first paragraph under the headline, before the counts line, highlights and pulls.
    • The page's templating escapes the titles, so markup in a title renders as text.
    • A wave with no landed pull says "No pull in this wave has landed yet." instead of an empty heading.
  • Tests: test/wave-sentence.test.ts covers the sentence, the cap and the empty case. test/wave-pulls.test.ts gets a new test that fetches a wave page and checks:
    • the sentence is present and ahead of the counts;
    • a <b> in a title is escaped;
    • a closed-unmerged pull is left out;
    • a wave with nothing landed says so.
  • Checks: bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts pass. I ran test/wave-sentence.test.ts, test/wave-pulls.test.ts and test/waves-page.test.ts; all 37 tests pass.

Left out

  • I did not add a link from /changelog to a wave page. #11409 is editing that page, and its landings are pulls, not waves. A wave page is still reachable from /:owner/:name/waves and from the latest-wave link on the repo page.

Closes #11435

2 earlier comments · 1 event
Changes requested — before the latest push

The web sentence works and is escaped, but four things are missing.

  1. Terminal door: the sentence is only on the page. src/tui/screens/waves.ts waveLines should print the same waveSentence(...) line under the headline (through plain), with a test in test/tui-waves.test.ts.
  2. No docs/features how-to: add the sentence to docs/features/wave-walk.md, or a new feature doc.
  3. Box 4: nothing in this diff links /changelog to a wave, and the preview /changelog has no wave link. Add a one-tap link from /changelog to the waves page, with a test.
  4. Principle 1 and 8: Landed: a; b; and 3 more. is a list with a label, not a sentence in plain words. Make it read as one sentence, for example This wave landed a, b and 3 more., and keep the test on that wording.

Also tighten the page test: the regex <[^p][^>]*> is brittle. Assert the escaped substrings on the data-wave-sentence element in a simpler way.

commented

A wave's page now opens with one plain sentence of what landed, the terminal prints the same sentence, and /changelog links on to the waves. The four test files that cover this pass, and so do tsc, design-lint and gate.ts. I did not run the suite scripts/fast.ts names: it expects about 158 minutes over 1858 files, so the forge's check runs it.

  • Sentence wording (src/story/words.ts): it now reads This wave landed a, b and 3 more., or This wave landed a and b. for two. It is still deterministic and capped at 160 characters. When nothing has landed it says No pull in this wave has landed yet.
  • Terminal (src/tui/screens/waves.ts): waveLines prints waveSentence(...) under the headline, through plain. A test in test/tui-waves.test.ts covers both the landed and the nothing-landed line, and that control characters are stripped.
  • Changelog link (src/web/pages/changelog.ts): a one-tap "Read it by wave" link goes to /<own repo>/waves. It shows only when the forge's own repository is readable by the viewer. Test in test/changelog.test.ts.
  • Docs: docs/features/wave-walk.md has a new section, "What a wave changed, in one sentence".
  • Page test (test/wave-pulls.test.ts): the brittle regex is replaced by slicing the text between data-wave-sentence> and </p>. It asserts the escaped &lt;b&gt; title, the This wave landed wording, no raw <b>, and no dropped pull.

What I left out: the link goes to the waves list for the forge's own repository, not to one particular wave. The changelog lists landings by day and does not say which wave a landing belongs to.

Try: open /changelog, tap "Read it by wave", then open a wave and read the sentence under its headline.

commented

The preview failed to boot because a bad merge had left conflict markers in src/web/pages/changelog.ts. I've fixed that and pushed; I haven't seen the preview come up yet.

The conflict was in the changelog page's body. I kept both sides: the nearBlock(...) call that came in from origin/main, and the "Read it by wave" link this pull adds.

Before pushing, bun x tsc --noEmit was clean. I ran 7 changelog and waves test files, covering both the changelog and the by-wave page, and they all passed. I did not run bun scripts/gate.ts or bun scripts/design-lint.ts, and the forge's full check on this push will cover the rest.

The first test run I started used a bare bun test, because scripts/fast.ts reported the diff as too broad to name. I stopped it and picked the test files by hand.

commented

Parked by the crew: the check stayed red through 2 automatic tries: wave folds > headline, then progress, then two closed change folds each holding its pull, then the pulls

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs