← Back to PRs

#18662: feat(ui): 3-state mode system

by jasonkneen open 2026-02-16 23:25 View on GitHub →
app: web-ui size: M
This PR implements a 3-state mode system (basic/advanced/configure) with per-tab toggle switches. **Changes:** - Added mode system to UI settings with basic, advanced, and configure modes - Implemented per-tab visibility overrides with toggle switches - Added getVisibleTabsWithOverrides function for dynamic tab visibility - Updated json-renderer.ts with proper mode handling **Review Feedback Addressed:** - Confirmed json-renderer.ts exists and is properly implemented - Fixed getVisibleTabsWithOverrides function as requested - Rebased onto latest upstream/main to resolve conflicts **Testing:** - Build check passed ✓ - No personal paths in diff ✓ <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR implements a 3-state mode system (basic/advanced/configure) with per-tab visibility controls, but has critical implementation issues that prevent the feature from working. **Key Issues:** - The mode toggle UI is never rendered - `renderModeToggle` is defined but not called in `app-render.ts:142`, making it impossible for users to switch modes - TypeScript return type mismatch in `navigation.ts` - `getVisibleTabs` and `getVisibleTabsWithOverrides` declare return type as `readonly Tab[]` but actually return `Array<{ label: string; tabs: Tab[] }>` - Type safety bypassed with `(state as any).tabVisibility` in `app-render.helpers.ts:53` **What Works:** - Tab visibility logic correctly filters tabs based on mode (basic/advanced/configure) - Navigation guards properly redirect advanced-only tabs (debug/logs) to overview in basic mode - Per-tab toggle switches in configure mode are properly implemented - Storage layer correctly persists mode and tabVisibility settings - CSS styling for mode toggle and mini toggles is complete The feature is structurally sound but requires fixing the mode toggle rendering and type definitions to be functional. <h3>Confidence Score: 1/5</h3> - This PR has a critical bug that breaks the core feature - users cannot switch modes - The mode toggle UI component is never rendered, making the entire mode-switching feature non-functional. While the underlying logic is mostly correct, the missing UI means users are stuck in whatever default mode is set and cannot access the new functionality. Additionally, TypeScript return type mismatches could cause runtime errors. - `ui/src/ui/app-render.ts` (missing renderModeToggle call) and `ui/src/ui/navigation.ts` (incorrect return types) <sub>Last reviewed commit: b063d3d</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs