Repository navigation
fix(mcp-ui): shared project card for create-project and create-branch - #578
Merged
Merged
Conversation
Rodriguespn
reviewed
Nov 19, 2026
Rodriguespn
reviewed
Nov 19, 2026
Rodriguespn
reviewed
Nov 19, 2026
Rodriguespn
reviewed
Nov 19, 2026
Rodriguespn
approved these changes
Nov 19, 2026
Contributor
There was a problem hiding this comment.
Approving from team-ai side to unblock you. Waiting on @charislam feedback on the design. The failing "Check Management API Types" job isn't from this PR: the upstream API spec changed. #579 fixes it, so it'll go green once that's merged and the stack is rebased on main.
`create-project:health-checks` passes through ACTIVE_UNHEALTHY so the "Checking health" step is visible. `create-project:polling-down` fails the first three polls so the view stops checking and offers Retry. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Both views now render the same `ProjectCard`, after the project card in the other Supabase surfaces: breadcrumbs (organization, then for a branch its project), name, a status badge that names the current step, the ref and region, and an Open in dashboard action. Connection details stay below once it is ready. `useCreationStatus` holds what the views share: polling, Retry once checking has stopped, the badge and note for each state, and the screen reader announcements. Each view supplies how to read its status and how a status maps to a step. This replaces `ProgressView` and `StepStatus`, which are removed along with their styles. Colours now go through Studio's semantic tokens, prefixed `--sb-color-` (`--sb-color-foreground`, `--sb-color-border`, …). A bridge in `base` maps the host's MCP Apps colour variables onto them, picking for each token the variable that means the same thing in Claude, Codex and Inspector, so the components can move into Studio unchanged. `pnpm lint:css` fails on a host colour read outside the bridge, or a `--sb-color-*` token declared outside `base`. Co-Authored-By: Claude Fable 5.2 <[email protected]>
- Add optional `resultMeta` on `Tool` in `@supabase/mcp-utils`, merged onto `tools/call` results without changing `onToolCall` data. - Attach the server's normalised `dashboardUrl` (defaulting to `DEFAULT_DASHBOARD_URL`) to MCP Apps tool results via `supabase.com/dashboardUrl`. - Read `dashboardUrl` from result `_meta` in `useMcpView` (falling back to prod for older servers) and thread it through `CreateProject`, `CreateBranch`, and `ReadyActions`.
`useLookup` kept the latest `load` in a ref, updated by an effect after every render, so the fetch effect could call it without re-running when it changed. `useEffectEvent` does this directly. It is stable from React 19.2, so the React ranges now start there; the installed versions already match. `useMachine` keeps its ref: `run` is called from `send`, which event handlers call, and an effect event may only be called from effects. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each view rendered a `<div className="<name>-view">` so view-specific CSS could nest under it. Views now ship only their own CSS, so a `view.css` already applies to that view alone and needs no wrapper to scope it. The views render `ProjectCard` directly. The `view` layer, `view.css` and the `--sb-view-<view>-*` namespace stay: a view that needs its own CSS chooses its own selectors, within the layer's cap of one class. SKILL.md and the README now say so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The lint recognised host colours only by their `--color-` prefix, so a misspelt name in the bridge (`var(--color-text-primay, …)`) passed, and every host silently got the fallback. It now loads the names a host may send from ext-apps' schema (`McpUiStyleVariableKey`) and fails on a host colour read, or a host variable fallback declared in `base.css`, whose name isn't one of them. Suggested by Pedro in review of #578. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rver A server scoped to the parent project has no `get_project`, so the lookup failed on every create-branch view, and each failure counted as a tool error in the hosted metrics. The view already knows when the server is scoped, so it no longer asks; the card shows no breadcrumbs, as before. Adds tests for the lookups failing: no breadcrumbs when the parent project can't be read, only the project when its organization can't, and no organization for a new project when it can't be read. Suggested by Pedro in review of #578. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Checking stopped only at done or failed, so a status that won't move on by itself (a paused project, say) was read every 5 seconds until the 10 minute timeout, with no spinner on its badge to say the view was still checking. Such a status now settles checking too, so the spinner and the polling agree. Suggested by Pedro in review of #578. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…op round At most one read is ever in flight: following schedules the next read only after a result, checking stops only on a result, and Retry does a single read. A result therefore always belongs to the current state, so the round counter could never tell results apart. Events are now start, read, readFailed and retry, and read/readFailed mean what the state says (following, or the read Retry started). The two read effects become one, and the effect runner has a single path from a result or error to its event.
…fect The checking machine described its reads as effects for a generic runner to schedule, cancel and replay. A reducer and one effect do the same with less: the reducer returns only the next state, the pending delay is part of the following state, and a single effect keyed on the state reads after that delay. Its cleanup clears the timer and drops a result that arrives after the state has moved on or the view is gone. That leaves ConnectionDetails as the only user of useMachine, and its effects need no cleanup, so useMachine returns to its simpler form and the tests for its cleanup machinery go with it. Tests that ran several polls in one advance now step one interval at a time, since each read is scheduled after the previous result has rendered.
Choosing the badge, note and announcement was mixed in with the checking machine, and used a cast and a non-null assertion to get at the progress and data that only exist once the tool call is ready. describeCreation is now a pure function that switches on the tool call's status first, so in the ready case the data and its progress are always there. useCreationStatus runs the checking and composes it with the announcements. The cases that were covered only through the views now also have direct unit tests.
canPollInitial and read always went together: the status can be read exactly when the view has a way to read it. Leaving read out now means it can't be read: checking never starts, there is no Retry, and a status that is still changing gets the note to ask the assistant to check. Each view's per-status constants (noun, step labels, progress, the tool to check with) are one config exported from its status.ts and passed as a single prop.
Both views repeated the same string-argument helper and the checks for whether the host can call tools or open links. useMcpView now returns canCallTools, inputText(key) and openLink(url). openLink is undefined when the host can't open links, so there is no separate flag to keep in step with it. Studio links stay with the views, since each view decides which dashboard page it links to: ConnectionDetails takes the project's URL from the view instead of building it from the dashboard URL (it no longer exports studioUrl). It takes the view with the project ref instead of the app and link capability separately, and the card's name fallback is one cardName helper.
The badge tone union was written out in four places; Badge now exports Tone and the others use it, narrowed where danger isn't possible. useCreationStatus returns the ProjectCard props it owns (badge, note, retry, loading) as card, so views spread it instead of pulling out isLoading and passing it back. isLoading stays available for the details and name.
… flags Every tool call checked canCallTools and then asserted app!, and ConnectionDetails took a second flag, canReachProject, for whether calls for its project were allowed. useMcpView now returns callTool, undefined when the host can't proxy tool calls, in place of canCallTools. Views pass it (or, on a server scoped to the branch's parent, nothing) to useCreationStatus's read, their lookups and ConnectionDetails, so the flags and non-null assertions go. mcpViewHelpers is no longer exported: the view tests mock callTool on the view directly.
progress returned indexes into the config's labels, which describeCreation looked up with non-null assertions. The first label could never be returned: it only made labels.length the step total. A step now carries its label and its place (step of total), and a failure names the step it failed during. Each status.ts builds them with a small helper, and CreationConfig loses labels. The badge, note and announcement text are unchanged.
shared/project-status.ts had one caller, which overrode its tone for changing statuses, and its failure and ACTIVE_* labels were never reached: progress handles those statuses first. create-project/status.ts now reads one table of the statuses that do reach the fallthrough, each with its Studio label and whether it moves on by itself; any other status keeps the derived label and warning tone. The results are unchanged.
Each view worked out its details and name for the loading, ready and failed cases (CreateProject with a three-level ternary) and passed isLoading back to the card that already had it. ProjectCard now applies one rule: a detail or name without a value is a skeleton while loading, and after that a detail is left out and the name falls back to "New <noun>". Views pass flat details and the created or requested name, cardName goes, and useCreationStatus hands the card its noun and no longer returns a separate isLoading.
charislam
force-pushed
the
feat/project-card-views
branch
from
November 20, 2026 19:10
469c763 to
7afce44
Compare
Merged
Coverage Report for CI Build 44809496095Coverage increased (+0.005%) to 98.146%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This was referenced Nov 23, 2026
barryroodt
pushed a commit
that referenced
this pull request
Nov 26, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>mcp-utils: 0.11.1</summary> ## [0.11.1](mcp-utils-v0.11.0...mcp-utils-v0.11.1) (2026-11-26) ### Bug Fixes * **mcp-ui:** shared project card for create-project and create-branch ([#578](#578)) ([efe189f](efe189f)) </details> <details><summary>mcp-server-supabase: 0.20.0</summary> ## [0.20.0](mcp-server-supabase-v0.19.0...mcp-server-supabase-v0.20.0) (2026-11-26) ### Features * **debugging:** add project issues DEBUG-311 ([#546](#546)) ([01f8021](01f8021)) * **mcp-server-supabase:** add optional schemas parameter to generate_typescript_types ([#592](#592)) ([7532f53](7532f53)) ### Bug Fixes * **debugging:** link docs once per issue in get_issues ([#610](#610)) ([74801d8](74801d8)) * **mcp-server-supabase:** detect import maps uploaded with a ./ prefix ([#591](#591)) ([6b8f4dc](6b8f4dc)) * **mcp-server-supabase:** keep a declined or cancelled SQL confirmation final ([#581](#581)) ([03afe8e](03afe8e)) * **mcp-server-supabase:** match Studio's notebook row_limit and clarify skip and blank-input messages ([#593](#593)) ([ad07f1b](ad07f1b)) * **mcp-server-supabase:** skip cost confirmation for $0 projects on clients without forms ([#608](#608)) ([50cfc37](50cfc37)) * **mcp-server-supabase:** stop reusing a removed import map on edge function redeploy ([#588](#588)) ([56093a6](56093a6)) * **mcp-ui:** shared project card for create-project and create-branch ([#578](#578)) ([efe189f](efe189f)) * **mcp:** confirm UPDATEs without WHERE that follow a comment and set a dollar-quoted value ([#612](#612)) ([468907a](468907a)) * **mcp:** confirm UPDATEs without WHERE that use inheritance syntax ([#565](#565)) ([687b3ee](687b3ee)) * **mcp:** confirm UPDATEs without WHERE when a column name ends in where ([#557](#557)) ([57fa34b](57fa34b)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.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.
Stacked on #573. Redesigns the
create_projectandcreate_branchviews as one shared project card.What changed
ProjectCardshows breadcrumbs (organization, and for a branch its project), the name, a status badge, the ref and region, and an Open in dashboard action. Connection details sit below once it is ready.usePollgains arestartKeyfor this.useCreationStatusowns polling, Retry, the badge and note for each state, and the screen reader announcements. Each view supplies how to read its status and how a status maps to a step.ProgressViewandStepStatusare removed.--foreground,--border,--card, …). A bridge in thebaselayer maps the host's MCP Apps colour variables onto them, andpnpm lint:cssfails on a host colour read anywhere else.create-project:health-checksandcreate-project:polling-down.Why
--color-border-primaryis a strong line, Codex's is a control outline). Mapping them once onto Studio's tokens keeps the views consistent across hosts and lets the components move into Studio unchanged. The table of choices is in the bridge's comment instyles.css.Verification
pnpm --filter @supabase/mcp-ui test: 64 tests pass, including new view tests for both cards (steps, failure, Retry, timeout, loading skeletons, breadcrumbs).pnpm --filter @supabase/mcp-ui build(typecheck andlint:css) passes.pnpm dev:mock): each steps through to Active and loads its connection details; the branch card shows "Organization / Project" above the branch name.🤖 Generated with Claude Code