Skip to content

fix(gallery): make bare root open a real entry - #21618

Merged
teamleaderleo merged 10 commits into
feat-cmux-nextfrom
codex/gallery-root-fix-20261018
Oct 21, 2026
Merged

teamleaderleo merged 10 commits into
feat-cmux-nextfrom
codex/gallery-root-fix-20261018

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The bare /gallery/ source-gallery URL rendered an empty router outlet until a deep link or reload supplied an entry. It now waits only for the Composer source, then redirects to its first variant, so a cold root opens a usable, source-backed preview without compiling the full registry first.

Testing

  • bun test test/gallery-env.test.ts test/gallery-entry-store.test.ts test/gallery-live.test.ts — 12 pass, 0 fail.
  • Live 4221 browser check: bare /gallery/ redirected to #/agent-pane.composer/new-chat and rendered the Composer.
  • No native cmux build run.

Changelog

none (developer-gallery routing fix).

Proof

The published Lawrence gallery remains available at https://cmux-lawrences-mac-mini.tail137216.ts.net:18796/live/; local source-gallery fix is exact head 87bc350.

Checklist

  • Focused gallery tests pass.
  • Root route is now a real Composer state.
  • No native build run.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 16393ed4-73d0-4e55-b6a5-6964bbd94a30

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-cbk0s created for this PR by the cmux coordinator.

@blacksmith-sh

blacksmith-sh Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Found 26 test failures on Blacksmith runners:

Failures

Test View Logs
test/agent-pane-column-edges.test.ts/agent-pane-column-edges.test View Logs
test/agent-pane-column-edges.test.ts/agent-pane-column-edges.test View Logs
test/agent-pane-no-capsules.test.ts/agent-pane-no-capsules.test View Logs
test/agent-pane-no-capsules.test.ts/agent-pane-no-capsules.test View Logs
test/agent-pane-permission-receipt.test.ts/agent-pane-permission-receipt.test View Logs
test/agent-pane-permission-receipt.test.ts/agent-pane-permission-receipt.test View Logs
test/agent-pane-queue-steer.test.ts/agent-pane-queue-steer.test View Logs
test/agent-pane-queue-steer.test.ts/agent-pane-queue-steer.test View Logs
test/agent-pane-stream-jitter.test.ts/agent-pane-stream-jitter.test View Logs
test/agent-pane-stream-jitter.test.ts/agent-pane-stream-jitter.test View Logs

...and 16 more test failures. View all on Blacksmith

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 043d7d6: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr21618 -f ref=codex/gallery-root-fix-20261018 -f platform=macos -f backend_mode=local

Probably yours: agent-pane-permission-receipt.test.ts fails here but not on main's latest full suite. Seen on other PRs too (likely flaky): agent-pane-no-capsules.test.ts, composer-history.test.ts, diff-toolbar-narrow.test.ts and 22 more.

CI failed on 043d7d6912 (run 39553844574 attempt 1): 4 code, 1 unknown.

Job Verdict Why
web / react-apps-check (1) code a web test failed
web / react-apps-check (4) code a web test failed
web / react-apps-check (3) code a web test failed
web / react-apps-check (2) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs agent-pane-no-capsules.test.ts agent pane page > rounds its controls as small-radius rects, not capsules: failed (job)
  • seen on other PRs composer-history.test.ts ↑ and ↓ in an empty prompt step through the chat's earlier prompts: failed (job)
  • seen on other PRs diff-toolbar-narrow.test.ts at 460 px the base picker's label stays in its chip, clear of jump-to-file: failed (job)
  • seen on other PRs agent-pane-queue-steer.test.ts queued and steering prompts > the queue takes its own place in the stack: nothing is cut off or draw...: failed (job)
  • seen on other PRs agent-pane-stream-jitter.test.ts webkit: scrolling up while a reply streams is never pulled back: failed (job)
  • seen on other PRs chief-context-copy.test.ts chromium, Catppuccin Mocha, 300px: the context's Copy trails its label and covers no text: failed (job)
  • seen on other PRs chief-context-copy.test.ts chromium, Apple System Colors Light, 300px: the context's Copy trails its label and covers no text: failed (job)
  • seen on other PRs chief-context-copy.test.ts webkit, Catppuccin Mocha, 300px: the context's Copy trails its label and covers no text: failed (job)
  • seen on other PRs chief-context-copy.test.ts webkit, Apple System Colors Light, 300px: the context's Copy trails its label and covers no text: failed (job)
  • seen on other PRs composer-suggested-prompt.test.tsx nothing is suggested from another folder, another worktree, a merged PR, an old chat or a busy one: failed (job)
  • ... 16 more in the job logs
Matched log lines
web / react-apps-check (1): (fail) agent pane page > rounds its controls as small-radius rects, not capsules [38.21ms]
web / react-apps-check (4): (fail) queued and steering prompts > the queue takes its own place in the stack: nothing is cut off or drawn over [1365.87ms]
web / react-apps-check (3): (fail) (unnamed) [149.15ms]
web / react-apps-check (2): (fail) the strip or queue and the card meet square in one rim, and the queue keeps room above [6300.63ms]

Not re-run automatically: web / react-apps-check (1), web / react-apps-check (4), web / react-apps-check (3), web / react-apps-check (2), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: web / Web status; NEW: green on the base 2cd6ae1; do not merge until green; see lane-rules
red: web / react-apps-check; no finished base run on 2cd6ae1 to compare; do not merge until green; see lane-rules
red: web / react-apps-check (1); no finished base run on 2cd6ae1 to compare; do not merge until green; see lane-rules
red: web / react-apps-check (2); no finished base run on 2cd6ae1 to compare; do not merge until green; see lane-rules
red: web / react-apps-check (3); no finished base run on 2cd6ae1 to compare; do not merge until green; see lane-rules
red: web / react-apps-check (4); no finished base run on 2cd6ae1 to compare; do not merge until green; see lane-rules

CI fast guards failed on 043d7d6912 (https://github.com/manaflow-ai/cmux/actions/runs/39553844574). It does not block the merge; a red guard merged into main breaks it for every open PR.
The log named no failed step; see the run.

Agents: python3 scripts/ci/guard_attribution.py fix applies the mechanical fixes locally.

Tour of 043d7d6912 (run): no media. The tour did not run: only webview code changed (1 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label to tour it on a Mac.

@github-actions

Copy link
Copy Markdown
Contributor

Unclear: web / react-apps-check (2) failed: no known signature; failed step: Test webviews.

CI failed on 87bc350bfc (run 39127707291 attempt 1): 2 unknown.

Job Verdict Why
web / react-apps-check (2) unknown no known signature; failed step: Test webviews
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Not re-run automatically: web / react-apps-check (2), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

@github-actions

Copy link
Copy Markdown
Contributor

CI fast guards failed on 87bc350bfc (https://github.com/manaflow-ai/cmux/actions/runs/39127707291). It does not block the merge; a red guard merged into main breaks it for every open PR.
The log named no failed step; see the run.

Agents: python3 scripts/ci/guard_attribution.py fix applies the mechanical fixes locally. This comment is updated in place on each push.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 33 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in webviews/src/gallery/shell/router.tsx. Listed for a lane to resolve.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The change is limited to the source gallery's bare landing route.

The required regression test is still missing and must be added before merging.

Findings

  1. P2 Root redirect lacks a test ▶

Summary

The gallery root now waits for Composer and redirects to its first variant instead of waiting for every entry to finish loading.

  • The bare gallery URL opens the Composer's first variant.

Reviews (5) · Last reviewed commit: "Merge branch 'feat-cmux-next' into codex..." · Reviewed by Greptile

Comment thread webviews/src/gallery/shell/router.tsx Outdated
Comment on lines +103 to +106
const variant = await firstVariant(DEFAULT_ENTRY);
if (variant)
throw redirect({
href: `/${encodeURIComponent(entry.id)}/${encodeURIComponent(Object.keys(entry.variants)[0]!)}${stringifySearch(search)}`,
href: `/${encodeURIComponent(DEFAULT_ENTRY)}/${encodeURIComponent(variant)}${stringifySearch(search)}`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Root redirect lacks a test

The new Composer redirect has no automated regression test. CLAUDE.md requires a failing behavioral test before a bug fix. The existing entry-store test calls find, not the router or waitFor, so it does not protect this change.

Before merging, add a test that keeps another entry pending, makes Composer ready, and checks that the root redirects to its first variant while preserving search settings. Record the same test's failure on the base and pass on the head.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@cursor

cursor Bot commented Oct 20, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

CI / web / react-apps-check (2) is red on 13 of 20 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

CI / web / react-apps-check (3) is red on 14 of 19 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

CI / web / react-apps-check (1) is red on 13 of 18 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

CI / web / react-apps-check (4) is red on 13 of 18 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 12 h, and no lane holds a lease on it. Adopted by the orphan sweep: merged feat-cmux-next in at c8d07f1. A later pass queues it for the merge hub if it is reviewed, small and red only on base reds.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 27 of 27 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@cursor

cursor Bot commented Oct 20, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by projects-3f on cosmic-gray · session

@teamleaderleo
teamleaderleo merged commit 9a4e7ca into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the codex/gallery-root-fix-20261018 branch October 21, 2026 08:12
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

merge-audit: #21618 merged at 043d7d6 without no SHIP review receipt on the head; no risk tier label. #23202 reverts it. To keep this change, add the missing evidence for 043d7d6 here; the next audit pass then closes #23202. Otherwise review and land #23202.

@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at 043d7d6

Post-merge independent review. A subagent read webviews/src/gallery/shell/router.tsx at this head (code only, nothing run). No blocking defects.

  • :104-113: the bare root redirects once agent-pane.composer is ready. waitFor (entryStore.ts:166-181) returns undefined for a missing, failed or empty registry, and the code then falls back to the old first-ready-entry path.
  • :114-117: the query string is kept, ids are URL-encoded, and hash history is unchanged. The redirect stays in beforeLoad, so Back and Forward behave as before.
  • No tooling or test loads the gallery shell's bare root (Shell.tsx:40 is the only consumer). Nothing on base has changed this code since.
  • Non-blocking: DEFAULT_ENTRY is a hard-coded id, guarded by the fallback, and no test covers the root redirect.

Risk tier: risk:normal (dev gallery routing, not shipped in the app; added now). This keeps the change; closing revert #23202.

@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant