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

A feature's menu entry carries its declared summary as its title #9686

Parked opened this
Closed without merging

An absorbed feature's menu entry now carries its declared summary as the link's title, escaped. An entry with no summary gets no title attribute. tsc, scripts/gate.ts, design-lint and test/features.test.ts with test/schema-migrations.test.ts pass; I did not run the full suite.

Notes

stopped parked by the crew deploy 8e1961e

opened this

An absorbed feature's menu entry now carries its declared summary as the link's title, escaped. An entry with no summary gets no title attribute. tsc, scripts/gate.ts, design-lint and test/features.test.ts with test/schema-migrations.test.ts pass; I did not run the full suite.

What changed

  • Where the summary lives: the menu reads rows only, with no git reads. So the summary is now stored on the app_feature row. A new additive migration, 20261108180000-app-feature-summary, adds a nullable summary column, and its pin is committed.
  • When it is written: it is saved when an admin absorbs the app (absorb) and when they accept a changed declaration (keepDeclaration). acceptDeclaration also saves a summary that changed on its own.
  • Reaching the menu: absorbedForNav returns the summary. menuTitle in src/actions/features.ts turns it into the title. It collapses whitespace, returns nothing for a blank summary, and cuts anything over 200 characters at a word, ending in ….
  • The menu item: MenuItem in src/web/ui.ts gets an optional title. Other menus are unchanged, and featureItems in src/web/layout.ts passes it only when there is one.
  • Tests (test/features.test.ts):
    • One renders the menu with a summary, with none, and with <script>alert(1)</script>. The last comes out escaped.
    • One checks the 200-character word cut.
    • They would fail on today's code, which never sets a title.

What to look at

  • Existing features show no title yet: features absorbed before this migration keep a null summary until an admin next absorbs or accepts them. I did not backfill, because that needs a git read per app. Say if you want a one-off backfill.
  • Summary is unreviewed: a summary change alone does not show as "pending" in Settings. It is saved when an admin accepts a name or page change, or when they absorb.

To try it

  1. Absorb an app whose forge.json declares a feature.summary.
  2. Open the user menu and hover its entry under "Features from apps".

A stray .claude/.cc-writes directory appeared inside src/core/migrations/ and broke schema loading, so I moved it to $TMPDIR. It was never tracked or committed.

🤖 Generated with Claude Code

Closes #9681

4 earlier comments
commented

An absorbed feature's menu entry now carries its declared summary as the link's title, escaped. An entry with no summary gets no title attribute. tsc, scripts/gate.ts, design-lint and test/features.test.ts with test/schema-migrations.test.ts pass; I did not run the full suite.

What changed

  • Where the summary lives: the menu reads rows only, with no git reads. So the summary is now stored on the app_feature row. A new additive migration, 20261108180000-app-feature-summary, adds a nullable summary column, and its pin is committed.
  • When it is written: it is saved when an admin absorbs the app (absorb) and when they accept a changed declaration (keepDeclaration). acceptDeclaration also saves a summary that changed on its own.
  • Reaching the menu: absorbedForNav returns the summary. menuTitle in src/actions/features.ts turns it into the title. It collapses whitespace, returns nothing for a blank summary, and cuts anything over 200 characters at a word, ending in ….
  • The menu item: MenuItem in src/web/ui.ts gets an optional title. Other menus are unchanged, and featureItems in src/web/layout.ts passes it only when there is one.
  • Tests (test/features.test.ts):
    • One renders the menu with a summary, with none, and with <script>alert(1)</script>. The last comes out escaped.
    • One checks the 200-character word cut.
    • They would fail on today's code, which never sets a title.

What to look at

  • Existing features show no title yet: features absorbed before this migration keep a null summary until an admin next absorbs or accepts them. I did not backfill, because that needs a git read per app. Say if you want a one-off backfill.
  • Summary is unreviewed: a summary change alone does not show as "pending" in Settings. It is saved when an admin accepts a name or page change, or when they absorb.

To try it

  1. Absorb an app whose forge.json declares a feature.summary.
  2. Open the user menu and hover its entry under "Features from apps".

A stray .claude/.cc-writes directory appeared inside src/core/migrations/ and broke schema loading, so I moved it to $TMPDIR. It was never tracked or committed.

🤖 Generated with Claude Code

commented

The preview deploy didn't fail on my change, so I changed nothing and pushed nothing. The log you pasted ends in done: https://lab--9686--forge-trevato-apps.open-platform.sh. It boots, serves, and / answers 200.

The "no tests declared, none run" note is because this repo's forge.json has no test command. The tests are under check instead (fast, run and verify), and the forge runs those against each push.

I ran these against the pushed commit and they passed:

  • bun scripts/gate.ts
  • bun x tsc --noEmit
  • bun scripts/design-lint.ts
  • test/features.test.ts and test/schema-migrations.test.ts

I did not run the full suite. If the check run on #9686 comes back red, send me its log and I'll fix that.

commented

I merged main into the branch and pushed it. The only conflict was the import line in test/features.test.ts.

Both sides had changed that line: main added declaresFeature and this pull added menuTitle. I kept both in the import, and no other file needed changes.

After the merge, bun x tsc --noEmit is clean and test/features.test.ts passes (26 tests). I didn't run the rest of the suite or scripts/gate.ts; the forge runs the full check on this push.

The pull is still the feature menu entry carrying its declared summary as its title (#9681).

commented

The gate failed because no commit message on the pull had a Try: line. I added an empty commit with one and pushed it.

bun scripts/gate.ts printed nothing when I re-ran it, which I'm reading as passing. I didn't re-run the tests, since only a commit message changed.

The Try: line says to open the preview at https://lab--9686--forge-trevato-apps.open-platform.sh and hover a feature's menu entry. The declared summary should show as its title.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs