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

web/layout: stop loading the server through the Talk count and the page links #17388

opened this

Merged 18h 43m ago, live in production

Nearly every test reaches src/web/layout.ts, and the layout reached the HTTP server and the MCP tools by two paths. The Talk button's count went through actions/conversationconfirms, which imports http/mcp/load. The page links lived in web/standards.ts, which imports http/mcp/load too.

Notes

opened this

Nearly every test reaches src/web/layout.ts, and the layout reached the HTTP server and the MCP tools by two paths. The Talk button's count went through actions/conversation_confirms, which imports http/mcp/load. The page links lived in web/standards.ts, which imports http/mcp/load too. Cutting only the first edge changed nothing, so both go.

  • The Talk button asks core/fence's countWaiting directly. The one-line waitingCount wrapper in conversation_confirms had no other caller and is gone.
  • pageLinks, linkHeader, unindexed, UNINDEXED_PAGES and the oEmbed href move from web/standards.ts to web/page_links.ts, which imports no route module. The code is unchanged, so the page is byte-for-byte what it was.
  • test/layout-closure.test.ts walks the layout's import closure. It is red, naming the chain, when the closure reaches src/http/server.ts, src/http/mcp.ts or src/http/mcp/, or grows past 2,000 source files. Checked red with the old import put back; it runs in 194 ms.

Before and after (scripts/tier-input importsReader; 400 gate tests sampled with seed 17):

  • layout.ts import closure: 4,416 -> 1,656 source files. server.ts and the 237 MCP files are no longer in it.
  • Mean test closure: 3,519 -> 3,116 source files (-11%).

Direction: smaller test closures, so the impact map selects fewer tests per change (#16876) Try: sign in with a confirm waiting and open any page: the Talk button shows the count, and the Link header still lists /llms.txt and the here alternate. No door: a move of existing helpers out of a route module, nothing a person uses changed No look: every page renders the same bytes; the first-view and head tests cover it

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs