Skip to content

render_map_tool: bottom carousel for place results on narrow/inline maps #283

Open

Description

@mattpodwysocki

Problem

The render_map_tool results panel (#262) is a 280 px list docked on the right. That works in Claude Desktop and on wide maps. In ChatGPT's inline view, though, the map is about 500 px tall and only as wide as the chat column, so the panel either covers much of the map or starts collapsed: it collapses below 560 px (appendPanelRows). ChatGPT's own place results use a horizontal carousel at the bottom, so that's the pattern users there expect.

Proposal

Pick the layout from the map's size, not from which host it's in:

  • Narrow or inline: a bottom carousel of cards (photo, name, category, distance, popularity), numbered to match the pins.
    • Swiping or clicking a card flies to its pin.
    • Clicking a pin scrolls to its card.
  • Wide or fullscreen: the side list as it is now (fullscreen button: render_map_tool: fullscreen button #286).

The items, numbering, dedupe across merged payloads and the Place Details enrichment (derivePanelItems, applyPanelNumbering, the batch /details/retrieve) can all be reused. This is a second way to render the same rows.

Open questions

  • Photos in ChatGPT: photos come through resources/read (mapbox://place-photo/{id}), which ChatGPT doesn't support, so today its cards would have no photos. Check whether ChatGPT lets the page call a tool (MCP Apps tools/call, or Apps SDK callTool). If it does, expose the photo proxy as a tool the page can call. Without photos, the carousel is much less compelling.
  • Layout: the map fit needs bottom padding for the carousel, in the same way it now leaves room on the right for the panel. The carousel must also stay clear of the Mapbox logo and attribution (see feat(render_map_tool): live traffic and Satellite/Traffic buttons on the map #278).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions