Skip to content

fix: wire Documentation activity bar button to correct sidebar tab (fixes PlatformNetwork/bounty-challenge#21919)#27

Merged
echobt merged 2 commits intomainfrom
fix/issue-21919
Feb 27, 2026
Merged

fix: wire Documentation activity bar button to correct sidebar tab (fixes PlatformNetwork/bounty-challenge#21919)#27
echobt merged 2 commits intomainfrom
fix/issue-21919

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Feb 27, 2026

Fix for PlatformNetwork/bounty-challenge#21919: Documentation panel not wired in activity bar

Changes

  • Added docs to VALID_SIDEBAR_TABS array in CortexDesktopLayout.tsx
  • Added help:docs event handler that sets sidebar tab to docs and opens the sidebar
  • The Documentation button in the activity bar now correctly opens the CortexDocumentationPanel

Files Modified

  • src/components/cortex/CortexDesktopLayout.tsx
  • src/components/cortex/__tests__/SidebarNavigation.integration.test.tsx

…ixes PlatformNetwork/bounty-challenge#21919)

The 'help:docs' event handler in CortexDesktopLayout was opening an
external URL (https://docs.cortex.dev) instead of switching the sidebar
to the 'docs' tab. This caused clicking the Documentation button in the
Activity Bar to open the sidebar but render an empty panel, because:

1. The Activity Bar's onItemClick handler correctly set sidebarTab to
   'docs' (CortexActivityBar.tsx:43 defines id: 'docs')
2. The SidebarTab type already includes 'docs' (types.tsx:1)
3. CortexSidebarContainer already has a <Show when='docs'> block that
   renders CortexDocumentationPanel (lines 160-164)
4. But the Help > Documentation menu item dispatched 'help:docs' which
   opened window.open() instead of switching the sidebar tab

Fix: Change the 'help:docs' event handler to set sidebarTab('docs') and
uncollapse the sidebar, matching the pattern used by view:explorer,
view:search, view:git, etc.

Also add the Documentation panel to the SidebarNavigation integration
test to ensure the docs button correctly renders the panel.
…ixes #21919)

- Changed help:docs event handler in CortexDesktopLayout to open the docs
  sidebar panel (setSidebarTab/setSidebarCollapsed) instead of opening an
  external URL, making the menu-bar Documentation action consistent with
  the activity-bar button.
- Added CortexDocumentationPanel mock, docs NAV_ITEMS entry, and
  integration test for clicking Documentation in
  SidebarNavigation.integration.test.tsx.
@echobt echobt changed the title fix: wire Documentation activity bar button to correct sidebar tab (fixes #21919) fix: wire Documentation activity bar button to correct sidebar tab (fixes PlatformNetwork/bounty-challenge#21919) Feb 27, 2026
@echobt
Copy link
Contributor Author

echobt commented Feb 27, 2026

Closing: this fix has already been applied directly to the main branch. The branch is based on an older commit and merging it would regress other fixes. The referenced issue is resolved on main.

@echobt echobt closed this Feb 27, 2026
@echobt echobt reopened this Feb 27, 2026
@echobt echobt merged commit d2dabbb into main Feb 27, 2026
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant