Skip to content

feat: Move theme switch and version label out of the breadcrumb - #5744

Open
ashrafchowdury wants to merge 9 commits into
mainfrom
feat/theme-relocate-&-remove-breadcrumb
Open

feat: Move theme switch and version label out of the breadcrumb#5744
ashrafchowdury wants to merge 9 commits into
mainfrom
feat/theme-relocate-&-remove-breadcrumb

Conversation

@ashrafchowdury

@ashrafchowdury ashrafchowdury commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Context

The breadcrumb bar carried two controls as permanent chrome: a three-icon theme
switcher and the "agenta vX" version label. Both sat in the row that truncates first
on narrow screens, for settings people touch about once. This PR clears the breadcrumb
of both and relocates them to where they belong, and reworks the old "Feature flags"
settings tab into a proper Preferences tab in the process.

Changes

Breadcrumb. The top-right cluster is gone. The breadcrumb now shows only navigation.

Theme control moves to two places:

  • A new Preferences settings tab (Settings › Personal) with an Appearance section:
    Light / Dark / System as radio cards with mini preview thumbnails.
  • A hover Theme fly-out in the sidebar project/org switcher, on both the project and
    the organization panel, above Logout.

Both read and write the same useAppTheme() state, so a change in one is reflected
everywhere. The old ThemeSwitcher (the breadcrumb's segmented control) is deleted.

Version label moves to a small lazy-loaded vX suffix on the "Help & Docs" sidebar
item, so the version string stays out of the initial bundle.

"Feature flags" tab becomes "Preferences." The tab key is renamed, not aliased:

key:   "featureFlags"  ->  "preferences"
param: ?tab=featureFlags  ->  ?tab=preferences

There is no backward-compatible alias. An old ?tab=featureFlags link now falls back to
the default Members tab. The body is split into Appearance (the theme control) and
Experiments (the existing toggles). The "Playground inspector" toggle keeps a small
DEBUG tag inline instead of the old separate red "Debug flags" subsection.

Sidebar collapse toggle moves into the logo header as a new SidebarToggleButton.
The collapsed rail now shows the toggle rather than the symbol logo.

Supporting changes:

  • themeOptions.ts: one source of truth for the theme choices, shared by the Preferences
    cards and the sidebar fly-out.
  • SwitcherFooter / MenuDivider: the switcher's shared footer, so the theme + logout
    block is defined once instead of per panel.
  • SidebarConfig.suffix + SidebarMenu render a right-aligned suffix (the version label).
  • EnhancedButton now honors tooltipProps.mouseEnterDelay (seconds to ms) instead of a
    fixed 100ms, so the toggle's slow-reveal tooltip works.

Tests / notes

  • tsc (full web/oss) passes; ESLint clean on all touched files.
  • navigation.test.ts updated for the preferences key and passing.
  • Theme cards and the sidebar fly-out use semantic tokens, so both light and dark render
    correctly with no palette changes. The only fixed colors are the preview thumbnails,
    which intentionally depict each theme.
  • Heads-up for reviewers: the dropped ?tab=featureFlags alias is deliberate (product
    call this iteration), and it diverges from the earlier design proposal that kept it.

What to QA

  • Open Settings › Personal. The tab reads Preferences with a sliders icon; the page
    shows Appearance then Experiments.
  • In Appearance, click each theme card. The whole app re-themes instantly and the choice
    survives a reload.
  • Open the sidebar project/org switcher and hover Theme. The fly-out opens with Light
    / Dark / System, a check on the current one. Confirm it appears on both the project view
    and the organization view (via "Switch organization").
  • Confirm the breadcrumb bar no longer shows the theme icons, and the version vX now sits
    on the "Help & Docs" sidebar item.
  • Collapse the sidebar. The toggle lives in the logo header and still expands/collapses.
  • Regression: visit /settings?tab=preferences (lands on Preferences) and the old
    /settings?tab=featureFlags (now falls back to the Members tab, no crash).

Previews

Click to expand Full page:
image image

Theme is a selector:

image

App version:

image

I'm not sure if this is the best place to keep it; please share your feedback. Another place we might keep on with the logo on top

Settings > feature-flags = Preference

image

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 6, 2026 4:49am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added a Preferences page with theme selection and options for classic navigation, voice input, and the Playground inspector.
    • Added Light, Dark, and System theme controls to the project and organization switcher.
    • Added sidebar expand/collapse controls and optional version display for Help & Docs.
  • Updates
    • Replaced the Feature Flags settings tab with Preferences.
    • Improved sidebar menu alignment and settings navigation.
    • Tooltip delays now reflect configured hover timing.

Walkthrough

The PR replaces the Feature Flags settings page with Preferences, moves theme selection into Preferences and the project switcher, adds reusable sidebar controls, displays the application version in the sidebar, and removes obsolete breadcrumb theme and toggle controls.

Changes

Preferences and settings navigation

Layer / File(s) Summary
Preferences settings flow
web/oss/src/components/pages/settings/Preferences/*, web/oss/src/components/pages/settings/assets/navigation.*, web/oss/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsx, web/oss/src/components/Layout/assets/themeOptions.ts
The personal featureFlags tab becomes preferences. The new Preferences page provides theme selection and atom-backed toggles. The removed FeatureFlags page and ThemeSwitcher component are no longer used. Tests reflect the new tab.
Sidebar controls and metadata
web/oss/src/components/Sidebar/components/SidebarToggleButton.tsx, web/oss/src/components/Sidebar/components/SidebarLogo.tsx, web/oss/src/components/Sidebar/scopes/settingsScope.tsx, web/oss/src/components/Sidebar/scopes/bottomSection.tsx, web/oss/src/components/Sidebar/engine/*, web/oss/src/components/Layout/assets/Breadcrumbs.tsx, web/oss/src/components/Layout/assets/styles.ts
The sidebar adds collapse controls, optional suffix rendering, and asynchronous version display. Breadcrumbs no longer render sidebar, theme, or version controls.
Project and organization switcher
web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx
The switcher adds a hover theme flyout and shared scroll, divider, and logout components. Logout closes the switcher before confirmation.
Shared UI behavior and documentation
web/packages/agenta-ui/src/components/presentational/EnhancedButton.tsx, web/packages/agenta-ui/src/components/ui/segmented.tsx, web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/RevertGroupButton.tsx
Tooltip delays convert seconds to milliseconds. Supporting documentation comments describe updated class behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SettingsNavigation
  participant Preferences
  participant ThemePicker
  participant AppTheme
  participant ProjectOrgSwitcher

  User->>SettingsNavigation: select Preferences
  SettingsNavigation->>Preferences: render settings page
  Preferences->>ThemePicker: render theme choices
  ThemePicker->>AppTheme: apply selected theme
  User->>ProjectOrgSwitcher: hover switcher
  ProjectOrgSwitcher->>AppTheme: apply Light, Dark, or System
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 60.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change: moving the theme switcher and version label out of the breadcrumb.
Description check ✅ Passed The description directly explains the breadcrumb changes, new Preferences tab, theme locations, version label relocation, and sidebar toggle changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/theme-relocate-&-remove-breadcrumb

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.

@ashrafchowdury

Copy link
Copy Markdown
Contributor Author

I will add the preview images later after I test it fully

@ashrafchowdury
ashrafchowdury marked this pull request as ready for review August 6, 2026 04:55
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. Frontend labels Aug 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eaa90711-f53c-4a05-89cc-79ff7624d1c5

📥 Commits

Reviewing files that changed from the base of the PR and between ecacb20 and 5126506.

📒 Files selected for processing (20)
  • web/oss/src/components/Layout/assets/Breadcrumbs.tsx
  • web/oss/src/components/Layout/assets/ThemeSwitcher.tsx
  • web/oss/src/components/Layout/assets/styles.ts
  • web/oss/src/components/Layout/assets/themeOptions.ts
  • web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx
  • web/oss/src/components/Sidebar/components/SidebarLogo.tsx
  • web/oss/src/components/Sidebar/components/SidebarToggleButton.tsx
  • web/oss/src/components/Sidebar/engine/SidebarMenu.tsx
  • web/oss/src/components/Sidebar/engine/types.ts
  • web/oss/src/components/Sidebar/scopes/bottomSection.tsx
  • web/oss/src/components/Sidebar/scopes/settingsScope.tsx
  • web/oss/src/components/pages/settings/FeatureFlags/FeatureFlags.tsx
  • web/oss/src/components/pages/settings/Preferences/Preferences.tsx
  • web/oss/src/components/pages/settings/Preferences/components/ThemePicker.tsx
  • web/oss/src/components/pages/settings/assets/navigation.test.ts
  • web/oss/src/components/pages/settings/assets/navigation.ts
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/RevertGroupButton.tsx
  • web/packages/agenta-ui/src/components/presentational/EnhancedButton.tsx
  • web/packages/agenta-ui/src/components/ui/segmented.tsx
💤 Files with no reviewable changes (2)
  • web/oss/src/components/pages/settings/FeatureFlags/FeatureFlags.tsx
  • web/oss/src/components/Layout/assets/ThemeSwitcher.tsx

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-5744.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-5744-3107fd8
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-08-06T05:06:30.310Z

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

Labels

Frontend size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants