Repository navigation
docs: correct which sidebar tab field surface.* verbs accept (#12803) - #12872
aliyansajid wants to merge 1 commit into
Conversation
…w-ai#12803) `docs/custom-sidebars.md` stated that a workspace's `tabs[i]` carries `surfaceId` for `surface.*` verbs, with `tabs[i].id` as "the panel behind the tab, not interchangeable". That is inverted, and the document's own worked examples (the `surface.focus` calls in the single-column and two-column sidebars) already pass `tabs[j].id`. `CustomSidebarDataContextBuilder` is authoritative: the per-workspace `tabs` array is built from `workspace.surfaces`, each entry's `id` is set from `surface.panelId`, and `surfaceId` is a separate optional field. Since the v2 API renamed panels to surfaces, `surface.focus`'s `surface_id` is that panel UUID, i.e. `tabs[i].id`. Passing `tabs[i].surfaceId` instead fails silently: the button fires, no error surfaces anywhere, and the sidebar simply never navigates, so it reads as a hit-testing or layout bug. `agents[j].surfaceId` correlating with `tabs[k].surfaceId` was already correct and is preserved; only the claim about which field `surface.*` accepts was wrong. `docs/subagents-panel-plan.md` (status: first pass shipped) repeated the same claim in its agent field table and is corrected the same way. Localization audit: both files are English-only developer docs with no translated counterparts, and none of the changed text appears in `Resources/Localizable.xcstrings` or `web/messages/en.json`, so no catalog updates are required. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
@aliyansajid cubic can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 339,945 of the 320,000 allowed lines of code this month. Reviews resume on 1 October 2026 (in 14 days). Paid plans include much higher monthly review limits. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
|
All contributors have signed the CLA ✍️ ✅ |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe documentation now identifies ChangesSurface identifier documentation
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains; the identifier documentation is consistent and no application behavior changed. Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (24 passed)
Full details: Cmux Full InternationalizationExplanation
Resolution Route the changed custom-sidebar guidance through the localized documentation source (using
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
|
|
|
I have read the CLA Document v2.2 and I hereby sign the CLA |
|
Thanks for the review. On the Cmux Full Internationalization pre-merge check, I believe this is a false positive for this change, and I'd rather explain than paper over it. The check is right that
Per CLAUDE.md, the requirement for a docs change is a localization audit, which is in the PR description: neither changed file has a translated counterpart, and none of the changed text appears in Happy to be corrected if the intent is that |
|
Thanks @aliyansajid! #14284 changed |
Fixes #12803
Summary
What changed?
docs/custom-sidebars.mddocumented the wrong field for focusing a tab from a custom sidebar. The "Live data you can bind to" prose said:That is inverted. The same document's own worked examples (the
surface.focuscalls in the single-column and two-column sidebars, lines 381 and 418) already passtabs[j].id— so the prose and the examples contradicted each other.Why?
CustomSidebarDataContextBuilderis authoritative:Layout/CustomSidebarDataContextBuilder.swift:93builds the per-workspacetabsarray fromworkspace.surfaces:202sets each entry's"id"fromsurface.panelId:207-210setssurfaceIdas a separate, optional fieldBecause the v2 API renamed panels to surfaces,
surface.focus'ssurface_idparameter is that panel UUID — i.e.tabs[i].id. This matches the reporter's independent measurement againstcmux tree --id-format both.Passing
tabs[i].surfaceIdinstead fails silently: the Button fires, no error surfaces anywhere, and the sidebar simply never navigates — so it presents as a hit-testing or layout bug rather than a bad argument. That is what makes the wrong doc costly.agents[j].surfaceIdcorrelating withtabs[k].surfaceIdwas already correct and is preserved; only the claim about which fieldsurface.*accepts was wrong. The issue notes these two are easy to conflate, so the fix keeps that distinction explicit.Also fixed beyond the issue:
docs/subagents-panel-plan.md:100(status: first pass shipped) repeats the identicalaccepted by surface.focusclaim in its agent field table. Corrected the same way so the error does not survive in a second place.Testing
Docs-only change; verified by reading the source of truth rather than by running the app:
tabs[i].idtosurface.panelIdinCustomSidebarDataContextBuilder.swift(lines 93, 202, 207-210) and confirmedsurfaceIdis a distinct optional fieldsurface.focusexamples in the same documentdocs/andskills/for the same claim to make sure no third copy remains:grep -rn "surfaceId" docs/ skills/ | grep -iE "focus|surface\.\*|verb"→ only the lines changed hereResources/Localizable.xcstringsorweb/messages/en.json, so no catalog updates are requiredDemo Video
Not applicable — documentation-only change with no UI or behavior impact. The rendered diff is the whole change.
Checklist
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Corrects the custom sidebar docs to state that
surface.*verbs accepttabs[i].id, nottabs[i].surfaceIdas previously documented (fixes #12803).surface.focusexamples and theCustomSidebarDataContextBuildersource, wheretabs[i].idis set fromsurface.panelIdandsurfaceIdis a separate optional field.docs/subagents-panel-plan.md;tabs[i].surfaceIdremains documented as the correlation key foragents[j].surfaceId.Written for commit 23b0222. Summary will update on new commits.
Summary by CodeRabbit
id,panelId, andsurfaceId.