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

Look pages: a Looks: line can name a look that has a query (/boards?help, /preview-admin/sample/next?pick) #15963

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

looksOf in src/checks/lookpages.ts now keeps a look with a short query, so /boards?help and /preview-admin/sample/next?pick are no longer dropped from app.looks. The query is ? followed by 1 to 100 characters from [\w\-.=&].

Notes

shipped production is serving it deploy 0adf720

opened this

looksOf in src/checks/look_pages.ts now keeps a look with a short query, so /boards?help and /preview-admin/sample/next?pick are no longer dropped from app.looks.

The query is ? followed by 1 to 100 characters from [\w\-.=&]. Looks with spaces or < in the query, an empty ?, or a query over 100 characters are still dropped. I updated the doc comment to match.

I added assertions for both cases in test/look-pages-comment.test.ts. That file passes (5 tests) and bun x tsc --noEmit is clean. I ran bun scripts/gate.ts --fix, but its output was cut off, so I can't say it passed.

I didn't touch how the page-matching step handles a look that has a query. I only checked that the look is kept, not that the Looks: line then matches a changed page.

Try it: bun test test/look-pages-comment.test.ts

I wrote this fresh rather than taking over the a643252 version from #15809's branch.

🤖 Generated with Claude Code

Closes #15962

commented

looksOf in src/checks/look_pages.ts now keeps a look with a short query, so /boards?help and /preview-admin/sample/next?pick are no longer dropped from app.looks.

The query is ? followed by 1 to 100 characters from [\w\-.=&]. Looks with spaces or < in the query, an empty ?, or a query over 100 characters are still dropped. I updated the doc comment to match.

I added assertions for both cases in test/look-pages-comment.test.ts. That file passes (5 tests) and bun x tsc --noEmit is clean. I ran bun scripts/gate.ts --fix, but its output was cut off, so I can't say it passed.

I didn't touch how the page-matching step handles a look that has a query. I only checked that the look is kept, not that the Looks: line then matches a changed page.

Try it: bun test test/look-pages-comment.test.ts

I wrote this fresh rather than taking over the a643252 version from #15809's branch.

🤖 Generated with Claude Code

Approved

Approved. The change is small and right: looksOf now keeps a look with a short query (1 to 100 chars of [\w\-.=&]), so forge.json's own /boards?help and /preview-admin/sample/next?pick entries are no longer dropped. I checked the consumers. pagesShowing already strips ?/# before routing, and the Looks: line regex (\/\S*) captures the query, so a named look matches via looks.includes. No injection surface: no space, <, quote or # is allowed. The test covers keep and drop cases (space, <, empty ?, over 100). It is a look-pages check only, so there is no page, TUI or README impact.

Two things I would do next:

  1. Add a lookNotes test in test/look-pages-comment.test.ts where a commit says Looks: /boards?help and looks contains it, expecting the (named) note. That would pin the end-to-end behaviour the scout said it did not verify.
  2. Make looksOf and the manifest's pathList share one rule, so the check and the manifest cannot disagree again about what a look may be.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs