Skip to content

Feat/onboarding and theme#86

Open
louz514 wants to merge 4 commits into
HCF-STUDIOS:mainfrom
louz514:feat/onboarding-and-theme
Open

Feat/onboarding and theme#86
louz514 wants to merge 4 commits into
HCF-STUDIOS:mainfrom
louz514:feat/onboarding-and-theme

Conversation

@louz514

@louz514 louz514 commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • New Features

    • Multi-step guided walkthrough tour for first-time admin users with keyboard navigation
    • Light/dark/auto theme toggle with persistent preferences
    • Improved empty state UI with guidance when no agents exist
    • Tour trigger button added to topbar
  • Style

    • Updated sign-in screen messaging and layout
  • Documentation

    • Comprehensive getting-started guide for self-hosters covering setup and configuration

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR adds an interactive onboarding experience for new admin users by introducing a guided walkthrough modal, dark/light theme toggle, improved empty states and copy, comprehensive styling, and documentation. The theme system bootstraps early with persistent localStorage state. The walkthrough modal syncs with tab navigation, supports keyboard controls, and remembers dismissal. Topbar gains theme and tour buttons. AuthScreen and FleetPanel improve their copy and empty states to guide new users.

Changes

Onboarding and Theme Customization

Layer / File(s) Summary
Theme System Foundation
src/components/ThemeToggle.tsx, src/main.tsx, src/styles.css
Type ThemeMode, helpers initTheme() and useTheme() hook persist theme to localStorage and apply data-theme attribute to DOM. main.tsx bootstraps theme before React render. CSS adds :root theme tokens, dark-mode media queries, and color-scheme declarations.
Walkthrough Modal Component and Storage
src/components/Walkthrough.tsx
Fixed 11-step sequence (fleet→skills→mcp-servers→schedules→channels→sandboxes→users→stats→logs→config→completion) with state-driven step index, open/close lifecycle, keyboard navigation (Escape, ArrowLeft/Right), and button controls. Exports walkthroughStorage for safe localStorage-backed dismissal persistence.
App Walkthrough Auto-open and State Wiring
src/App.tsx
Introduces tourOpen state and useEffect that auto-opens walkthrough on first auth when not previously dismissed. Wires Walkthrough close/tab-change events to state and navigation; passes onOpenTour callback to Topbar.
Topbar and Component UI Enhancements
src/components/Topbar.tsx, src/components/AuthScreen.tsx, src/components/FleetPanel.tsx, src/styles.css
Topbar renders ThemeToggle and "?" tour button wired to onOpenTour. AuthScreen updates heading to "Welcome" with improved copy referencing .env and Quick-start. FleetPanel empty state now shows icon, description, "Create your first agent" action, and tour hint. CSS styles walkthrough backdrop/card/progress, theme toggle sizing, topbar actions cluster, auth intro/hint/links, and empty-state container/typography/actions.
Getting Started Guide
docs/getting-started.md
Comprehensive walkthrough for self-hosters: signing in, detailed tour of each admin tab, minimum viable setup with required .env variables, common pitfalls checklist, and next-step documentation links.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant main as main.tsx
  participant ThemeToggle as ThemeToggle System
  participant localStorage
  participant DOM as document Element
  participant App
  participant Walkthrough as Walkthrough Modal
  User->>main: Load admin UI
  main->>ThemeToggle: initTheme()
  ThemeToggle->>localStorage: read stored theme mode
  ThemeToggle->>DOM: apply data-theme attribute
  main->>App: render React app
  App->>App: useEffect: if authed & not dismissed, tourOpen = true
  App->>Walkthrough: render with open={tourOpen}
  User->>Walkthrough: navigate steps via arrows/buttons
  Walkthrough->>App: onTabChange to active step's target
  User->>Walkthrough: press Escape or click Finish
  Walkthrough->>App: onClose({ dontShowAgain: true })
  App->>localStorage: walkthroughStorage.setDismissed(true)
  App->>App: tourOpen = false, close Walkthrough
  User->>App: click Topbar theme toggle
  App->>DOM: apply new data-theme attribute
  App->>localStorage: persist theme choice
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A rabbit hops into the gateway with glee,
Dark mode whispers, light shines bright—
Steps glow like breadcrumbs, "tour" cries free,
"Create your first agent!" the walkthrough shouts in delight.
🐰✨ Welcome to the admin's flight!

🚥 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 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat/onboarding and theme' directly describes the two major features added in this PR: an onboarding walkthrough component and theme toggle functionality.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

@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.

🧹 Nitpick comments (2)
apps/gateway/ui/src/components/Walkthrough.tsx (1)

124-175: ⚡ Quick win

Consider using native <dialog> element for consistency.

The codebase uses native <dialog> elements elsewhere (e.g., FleetPanel), but the walkthrough renders a custom div-based modal. Using <dialog> would provide built-in focus management, Escape key handling, and backdrop behavior, reducing manual event wiring while maintaining consistency with the rest of the codebase.

♻️ Refactor to use native dialog

The refactor would involve replacing the backdrop div with a <dialog> element, calling showModal()/close() in a useEffect, and relying on the native onClose event instead of manual keyboard handling for Escape.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/gateway/ui/src/components/Walkthrough.tsx` around lines 124 - 175, The
Walkthrough component uses a custom div-based modal/backdrop; switch it to a
native <dialog> to match other components (e.g., FleetPanel) so you can leverage
built-in focus, Escape, and backdrop behavior. Replace the outer <div
className="walkthrough__backdrop"> with a <dialog> element, add a ref and a
useEffect that calls dialogRef.current.showModal() when mounted and
dialogRef.current.close() when unmounting or onFinish, and wire the dialog's
onClose to call the existing onClose({ dontShowAgain: true }) where appropriate;
keep inner content, stepIdx state, setStepIdx, isLast logic and action button
handlers (Back/Next/Finish) unchanged so functionality remains identical. Ensure
aria-label, role/aria-modal attributes are moved or removed as appropriate and
that the dialog has the same CSS classes for styling.
apps/gateway/ui/src/styles.css (1)

7-76: 💤 Low value

Address stylelint formatting violations.

Static analysis flagged several formatting issues: missing whitespace before comment closing (line 11), missing empty lines before declarations (lines 33, 54, 75), and incorrect font-name casing for BlinkMacSystemFont (line 31). While these don't affect functionality, fixing them improves code consistency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/gateway/ui/src/styles.css` around lines 7 - 76, Fix stylelint
formatting: add a space before the block comment closing in the file header
comment (ensure "*/" is preceded by a space), add a single empty line before the
declaration blocks for the `@media` rule's inner selector (html:not([data-theme])
within `@media`) and before the html[data-theme="dark"] rule so there is a blank
line separating blocks, and normalize the font token value in --font to use the
correct BlinkMacSystemFont casing (ensure "BlinkMacSystemFont" is spelled with
the standard capitalization) inside the :root declaration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/gateway/ui/src/components/Walkthrough.tsx`:
- Around line 124-175: The Walkthrough component uses a custom div-based
modal/backdrop; switch it to a native <dialog> to match other components (e.g.,
FleetPanel) so you can leverage built-in focus, Escape, and backdrop behavior.
Replace the outer <div className="walkthrough__backdrop"> with a <dialog>
element, add a ref and a useEffect that calls dialogRef.current.showModal() when
mounted and dialogRef.current.close() when unmounting or onFinish, and wire the
dialog's onClose to call the existing onClose({ dontShowAgain: true }) where
appropriate; keep inner content, stepIdx state, setStepIdx, isLast logic and
action button handlers (Back/Next/Finish) unchanged so functionality remains
identical. Ensure aria-label, role/aria-modal attributes are moved or removed as
appropriate and that the dialog has the same CSS classes for styling.

In `@apps/gateway/ui/src/styles.css`:
- Around line 7-76: Fix stylelint formatting: add a space before the block
comment closing in the file header comment (ensure "*/" is preceded by a space),
add a single empty line before the declaration blocks for the `@media` rule's
inner selector (html:not([data-theme]) within `@media`) and before the
html[data-theme="dark"] rule so there is a blank line separating blocks, and
normalize the font token value in --font to use the correct BlinkMacSystemFont
casing (ensure "BlinkMacSystemFont" is spelled with the standard capitalization)
inside the :root declaration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 43456387-3460-4223-907e-935500b29cfc

📥 Commits

Reviewing files that changed from the base of the PR and between ff1913e and 646e902.

📒 Files selected for processing (9)
  • apps/gateway/ui/src/App.tsx
  • apps/gateway/ui/src/components/AuthScreen.tsx
  • apps/gateway/ui/src/components/FleetPanel.tsx
  • apps/gateway/ui/src/components/ThemeToggle.tsx
  • apps/gateway/ui/src/components/Topbar.tsx
  • apps/gateway/ui/src/components/Walkthrough.tsx
  • apps/gateway/ui/src/main.tsx
  • apps/gateway/ui/src/styles.css
  • docs/getting-started.md

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