Repository navigation
Connect Carbon tabs to their panels (OSS-439) - #709
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
74206f9 to
4bc64ce
Compare
There was a problem hiding this comment.
2 issues found across 13 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/manual-review/e2e/a11y-check.mjs">
<violation number="1" location="scripts/manual-review/e2e/a11y-check.mjs:1137">
P3: This checks only unique panel targets; duplicate tab IDs still pass the reciprocal-label check and make panel labels ambiguous. Check `tab.tabId` uniqueness too.</violation>
</file>
<file name="web/carbon-panel/src/routes/modpacks/+page.svelte">
<violation number="1" location="web/carbon-panel/src/routes/modpacks/+page.svelte:505">
P2: The inactive panels do not defer their data requests: `onMount` still calls `loadFavorites()` and `loadUploadedPacks()` on every visit. Start each view's load when its tab is selected so inactive views do not fetch before selection.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| <!-- Library view control: Browse / Imported / Favorites --> | ||
| <CarbonTabs tabs={libraryTabs} bind:selectedTab={activeView} /> | ||
| <CarbonTabs tabs={libraryTabs} bind:selectedTab={activeView} idPrefix="modpacks" /> | ||
| <CarbonInactiveTabPanels tabs={libraryTabs} selectedTab={activeView} idPrefix="modpacks" /> |
There was a problem hiding this comment.
P2: The inactive panels do not defer their data requests: onMount still calls loadFavorites() and loadUploadedPacks() on every visit. Start each view's load when its tab is selected so inactive views do not fetch before selection.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At web/carbon-panel/src/routes/modpacks/+page.svelte, line 505:
<comment>The inactive panels do not defer their data requests: `onMount` still calls `loadFavorites()` and `loadUploadedPacks()` on every visit. Start each view's load when its tab is selected so inactive views do not fetch before selection.</comment>
<file context>
@@ -500,349 +501,357 @@ one at https://mozilla.org/MPL/2.0/.
<!-- Library view control: Browse / Imported / Favorites -->
- <CarbonTabs tabs={libraryTabs} bind:selectedTab={activeView} />
+ <CarbonTabs tabs={libraryTabs} bind:selectedTab={activeView} idPrefix="modpacks" />
+ <CarbonInactiveTabPanels tabs={libraryTabs} selectedTab={activeView} idPrefix="modpacks" />
- {#if selectedIndexer === 'fuego'}
</file context>
| ); | ||
| if ( | ||
| tabs.length < 2 || | ||
| new Set(tabs.map((tab) => tab.id)).size !== tabs.length || |
There was a problem hiding this comment.
P3: This checks only unique panel targets; duplicate tab IDs still pass the reciprocal-label check and make panel labels ambiguous. Check tab.tabId uniqueness too.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/manual-review/e2e/a11y-check.mjs, line 1137:
<comment>This checks only unique panel targets; duplicate tab IDs still pass the reciprocal-label check and make panel labels ambiguous. Check `tab.tabId` uniqueness too.</comment>
<file context>
@@ -1120,9 +1111,47 @@ async function runPackagedRouteJourney(browser, base, theme = 'light') {
+ );
+ if (
+ tabs.length < 2 ||
+ new Set(tabs.map((tab) => tab.id)).size !== tabs.length ||
+ tabs.filter((tab) => tab.selected).length !== 1 ||
+ tabs.find((tab) => tab.selected)?.tabId !== selectedId ||
</file context>
| new Set(tabs.map((tab) => tab.id)).size !== tabs.length || | |
| new Set(tabs.map((tab) => tab.tabId)).size !== tabs.length || | |
| new Set(tabs.map((tab) => tab.id)).size !== tabs.length || |
4bc64ce to
46c927e
Compare
OSS-439
Every Carbon tab has a unique, reciprocal panel target. Tab enters the selected panel, including empty views. Inactive panel shells stay empty and hidden, and their components remain unmounted.
The audit covered Server detail, Modpacks Library and Import, Studio workspace and Add Mod, Login, Modules, Player detail, World Library detail, Settings and the shipped homepage Studio example. The standalone World View route has no CarbonTabs group.
Rebased on main
7138443edb719ba2b24bc0a11b22496da29b94a4, including #706 and #708. The existing Modpacks tab badge loads still fetch Favorites and Imported collections at page load. Server Files still defers its listing request until activation.Verification
Head:
46c927e9486dd1ee64e6fd8c75ff85f69aad841bbun run checkreported zero Svelte diagnostics.bun run testpassed 473 tests, with six opt-in live cases skipped. Both knowledge lint passes andgit diff --checkpassed.Summary by CodeRabbit