Repository navigation
Feat/mcp apps route planner load once fr - #292
Merged
Merged
Conversation
… in French
The route planner is the second MCP Apps view, for leadbay_followups_map, on
/chatgpt/mcp and /apps/mcp. Claude is unchanged: no pointer on /mcp, and the
followups_map description there is byte-for-byte what it was.
- route planner: reaches Leadbay through claude.ai's runtime only on claude.ai
and through the kit's transport everywhere else (it was dead in cowork and
in MCP Apps hosts); sizes itself under data-lb-surface="mcp-app" (680px or
the host's frame limits, a 360px map on a phone) so its 100%/vh layout does
not collapse in a frame sized from the page; opens on the agent's city
- apps.ts: ui://leadbay/route-planner, declaring cdnjs (Leaflet) as its only
resourceDomain; {{apps}} sentence in followups_map says the board is the
answer (16,725 chars on the apps surfaces)
- load once: the MCP Apps bridge keeps the first tool-input/tool-result;
lb.openingResult() hands it to the board, which renders it instead of
calling the tool again and continues with the agent's count / lensId / city
- French: lb.locale() (host locale, else browser) and lb.i18n({en, fr}); both
boards label through it (data-i18n on fixed markup), the kit's status
picker is localized; "Monitor" now reads "My leads" / "Mes leads"
- guide: "One page, three surfaces" rules for any board; CLAUDE.md lists both
views
- tests: 28 new in four new files; five lines widened in three existing apps
tests that pinned a single board
- 0.45.0
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s hosts On ChatGPT and other MCP Apps hosts the step told the agent to publish the route_planner artifact, which those hosts cannot do, so the map never opened. There it now calls leadbay_followups_map with the tour's city (or city_id) — the call the host shows the route planner for — and the artifact-only lead-desk step is dropped. Claude's steps are unchanged. - client.apps, set by buildServer from includeApps (the commerce pattern) - NextStepOption kind "open_board" - tests: tour-plan-board-on-apps-hosts, mcp-apps-client-flag (new files) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four changes to the MCP Apps boards, on top of #290 / #291:
leadbay_followups_map, on/chatgpt/mcpand/apps/mcp.tour_plan's "Route planner" step now works on MCP Apps hosts.Claude is unchanged:
/mcpand/fr/mcpcarry no board pointer, thefollowups_mapdescription there is byte-for-byte the same, andtour_plan's steps on Claude are identical.Changes
Route Planner as an MCP App
apps.ts:ui://leadbay/route-plannerforleadbay_followups_map. It declareshttps://cdnjs.cloudflare.com(Leaflet) as its onlyresourceDomains; the triage board still declares no CSP.window.claude.use("mcp"), so it was dead in cowork and in MCP Apps hosts. It now uses claude.ai's bridge only on claude.ai, and the kit's transport everywhere else.100%/vhlayout collapses in a frame sized from the page's own height. Underdata-lb-surface="mcp-app", set by the bridge after the handshake, it gets:containerDimensions(--lb-frame-height/--lb-frame-max-height);city/city_id.followups-map.md.tmpl: an{{apps}}sentence says the board is the rendering, so ChatGPT doesn't also draw place cards. That description is 16,725 chars on the apps surfaces.Load once
ui/notifications/tool-inputandtool-result.lb.openingResult()hands that result to the board. It'snullon cowork and claude.ai, and on an error result.countandlensId(the triage board pinsresult.lens.id). That means one call and oneLEAD_SEENreceipt instead of two.French
lb.locale()returns"fr" | "en": the MCP Apps host'slocaleonce it's reported, otherwisenavigator.languages[0].lb.i18n({ en, fr })returnst(key, vars), falling back to English per key.data-i18n/data-i18n-aria/data-i18n-placeholder.lb.leadStatusoptions are localized.Trip plans on MCP Apps hosts
tour_plan's "Route planner" step told the agent to publish theroute_plannerartifact, which these hosts can't do.client.appsis now set bybuildServerfromincludeApps, following the same pattern asclient.commerce.leadbay_followups_mapwith the tour's city (kind: "open_board"), and the artifact-only lead-desk step is dropped.Docs and release
package.json,server.json,plugin.json.Tests
New files:
components/test/mcp-app-opening.test.ts(12): opening result, first result kept, cancel/timeout, frame variables, locale, i18n, French status picker.components/test/boards-as-mcp-app.test.ts(9): both real boards booted in jsdom, as a fake MCP Apps host and as Claude artifacts.pull_leads, and next page continues with the agent'scountandlensId.components/test/guide-one-page-three-surfaces.test.ts(3).mcp/test/unit/mcp-apps-route-planner.test.ts(6): Claude side clean, pointer and sentence on both apps surfaces, CSP exactly cdnjs.core/test/unit/composite/tour-plan-board-on-apps-hosts.test.ts(6) andmcp/test/unit/mcp-apps-client-flag.test.ts(2).Existing tests touched: five lines in
mcp-apps-gate,mcp-apps-pathandmcp-apps-description(from #290). They pinned a single board (toEqual(["leadbay_pull_leads"]),toEqual([TRIAGE_URI]), skipping onlypull_leads) and are widened to admit the second one. No Claude-side assertion is loosened.Results:
main.How to verify
/chatgpt/mcp:🤖 Generated with Claude Code