Skip to content

feat(frontend): add onboarding UX - welcome modal, getting started ca… - #41

Open
saraiyakush wants to merge 2 commits into
mainfrom
feat/onboarding-ux
Open

feat(frontend): add onboarding UX - welcome modal, getting started ca…#41
saraiyakush wants to merge 2 commits into
mainfrom
feat/onboarding-ux

Conversation

@saraiyakush

@saraiyakush saraiyakush commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds first-time user onboarding to guide new users through the Project → Documents → Agent → Chat workflow with a
welcome modal, progress tracker, and smart defaults.

Changes

  • Add one-time welcome modal explaining Aktilot's 3-step workflow (Upload → Create Agent → Chat)
  • Add "Getting Started" progress card inside projects that tracks completion and auto-hides when done
  • Enhance empty states with contextual "why" explanations (FilesTab, AgentsTab)
  • Pre-fill new agent form with a sensible default system prompt and improved helper text
  • Add useOnboarding hook for localStorage-based onboarding state management
  • Add subtitle prop to EmptyState component for additional context
  • Fix tsconfig.e2e.json to include DOM types for Playwright's page.evaluate() calls

Type

  • Bug fix
  • New feature
  • Refactor / clean-up
  • Docs / config

Test plan

  • Unit tests: 12 new tests for useOnboarding hook (all 82 unit tests pass)
  • E2E tests: 5 new tests covering welcome modal, getting started card, agent defaults, empty states (all 14
    E2E tests pass)
  • Manual: Clear localStorage, open app → welcome modal appears → click "Get Started" → create project → see
    Getting Started card → dismiss or complete steps → card hides

Screenshots (UI changes)

Welcome Modal (first visit):
image

Getting Started Card (inside project):
image

Agent Form with Smart Defaults:
image

Checklist

  • ruff check . passes in backend/ (no backend changes)
  • npm run build passes in frontend/
  • New DB columns have an Alembic migration (no DB changes - uses localStorage)
  • No secrets or API keys committed

Summary by CodeRabbit

  • New Features

    • Added a welcome modal introducing document upload, agent creation, and chat workflows.
    • Added a Getting Started card with progress tracking and dismissible onboarding steps.
    • Onboarding progress and dismissals persist across visits and projects.
    • Improved agent creation guidance, defaults, and empty-state messaging.
    • Added helpful messaging to empty file lists.
  • Tests

    • Added end-to-end and unit test coverage for onboarding behavior and persistence.

@saraiyakush
saraiyakush requested a review from vikas0686 August 7, 2026 06:17
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@saraiyakush, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 59b46137-b37a-4c29-9878-7ccb6806f8fc

📥 Commits

Reviewing files that changed from the base of the PR and between 24753c2 and f432210.

📒 Files selected for processing (2)
  • frontend/src/__tests__/components/WelcomeModal.test.tsx
  • frontend/src/components/WelcomeModal.tsx
📝 Walkthrough

Walkthrough

This change adds frontend onboarding state and UI. It shows a first-visit welcome modal, adds a project getting-started card, updates agent and empty-state guidance, and adds hook and Playwright coverage for persistence and onboarding behavior.

Changes

Frontend onboarding

Layer / File(s) Summary
Welcome onboarding state and modal
frontend/src/hooks/useOnboarding.ts, frontend/src/components/WelcomeModal.tsx, frontend/src/App.tsx, frontend/src/__tests__/hooks/useOnboarding.test.tsx
Adds localStorage-backed welcome tracking, a controlled WelcomeModal, app-level rendering through AppWithOnboarding, and hook tests for initial state, persistence, and remount behavior.
Project onboarding card and guided empty states
frontend/src/components/GettingStartedCard.tsx, frontend/src/components/KnowledgeBaseLanding.tsx, frontend/src/components/AgentsTab.tsx, frontend/src/components/FilesTab.tsx, frontend/src/components/ui/empty-state.tsx, frontend/src/__tests__/hooks/useOnboarding.test.tsx
Adds the project getting-started card and dismissal flow, shows it from KnowledgeBaseLanding, updates new-agent defaults and guidance, extends EmptyState with a subtitle, and tests project-specific dismissal and visibility rules.
E2E onboarding coverage and fixture updates
frontend/e2e/onboarding.spec.ts, frontend/e2e/support/fixtures.ts, frontend/tsconfig.e2e.json
Updates Playwright setup for welcome-state control and adds end-to-end coverage for welcome modal persistence, getting-started progress and dismissal, agent-form defaults, and onboarding empty-state text.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant App
  participant useOnboarding
  participant localStorage
  participant WelcomeModal
  User->>App: open application
  App->>useOnboarding: read onboarding state
  useOnboarding->>localStorage: load welcome flag
  localStorage-->>useOnboarding: welcome flag
  useOnboarding-->>App: hasSeenWelcome
  App->>WelcomeModal: show when not seen
  User->>WelcomeModal: click Get Started
  WelcomeModal->>App: onClose
  App->>useOnboarding: markWelcomeSeen
  useOnboarding->>localStorage: persist welcome flag
Loading
sequenceDiagram
  participant User
  participant KnowledgeBaseLanding
  participant useOnboarding
  participant GettingStartedCard
  participant localStorage
  User->>KnowledgeBaseLanding: open project
  KnowledgeBaseLanding->>useOnboarding: check card visibility with project state
  useOnboarding->>localStorage: load project dismissal
  localStorage-->>useOnboarding: dismissal state
  useOnboarding-->>KnowledgeBaseLanding: show or hide card
  KnowledgeBaseLanding->>GettingStartedCard: render steps and progress
  User->>GettingStartedCard: dismiss card
  GettingStartedCard->>KnowledgeBaseLanding: onDismiss
  KnowledgeBaseLanding->>useOnboarding: dismissGettingStarted(projectId)
  useOnboarding->>localStorage: persist dismissal
Loading

Possibly related PRs

  • vikas0686/Aktilot#24: Adds related frontend Playwright test infrastructure that this PR extends for onboarding coverage.

Suggested reviewers: vikas0686

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the frontend onboarding UX as the main change, including the welcome modal and Getting Started experience.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/onboarding-ux

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.

@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: 1

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

Inline comments:
In `@frontend/src/components/WelcomeModal.tsx`:
- Line 31: Update the Dialog’s onOpenChange handler in WelcomeModal so it
accepts nextOpen and calls onClose whenever nextOpen is false, while leaving
open-state behavior unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b316752f-863e-4ad6-a85f-9726a166dae9

📥 Commits

Reviewing files that changed from the base of the PR and between 26b0890 and 24753c2.

📒 Files selected for processing (12)
  • frontend/e2e/onboarding.spec.ts
  • frontend/e2e/support/fixtures.ts
  • frontend/src/App.tsx
  • frontend/src/__tests__/hooks/useOnboarding.test.tsx
  • frontend/src/components/AgentsTab.tsx
  • frontend/src/components/FilesTab.tsx
  • frontend/src/components/GettingStartedCard.tsx
  • frontend/src/components/KnowledgeBaseLanding.tsx
  • frontend/src/components/WelcomeModal.tsx
  • frontend/src/components/ui/empty-state.tsx
  • frontend/src/hooks/useOnboarding.ts
  • frontend/tsconfig.e2e.json

Comment thread frontend/src/components/WelcomeModal.tsx Outdated
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