Skip to content

Conversation

@mmabrouk
Copy link
Member

@mmabrouk mmabrouk commented Jan 10, 2026

Summary

Implements demo project workflow improvements including:

  • Add open demo project option in onboarding screen

    • Adds "Return to your workspace" banner with improved UI and fixed positioning
    • Implements demo project state management (tracking last non-demo project, return hints)
    • Adds modal prompt when returning from demo to real workspace

    Changes

    State Management

    • Added lastNonDemoProjectAtom - tracks the user's last non-demo project
    • Added demoReturnHintPendingAtom & demoReturnHintDismissedAtom - manages demo return flow
    • Added helper functions cacheLastUsedProjectId for persisting project state

    UI Improvements

    • Layout banner: Fixed positioning banner that stays at top while scrolling
    • Replaced text-based banner with actionable "Return to your workspace" button
    • Added modal showing instructions when returning from demo

    OnboardingScreen

    • Updated to use project.is_demo field from API response

    Test Plan

    • Sign up with email/password → verify routed to /post-signup onboarding
    • Complete onboarding → verify placed in demo project
    • Scroll page → verify demo banner stays fixed at top
    • Click "Return to your workspace" button
    • Verify modal appears with instructions (first time)
    • Dismiss modal → verify navigates to last used real workspace
    • Re-enter demo → verify "Do not show again" dismissal is respected

Open with Devin

@vercel
Copy link

vercel bot commented Jan 10, 2026

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

Project Deployment Review Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jan 27, 2026 8:34am

Request Review

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 10, 2026
@mmabrouk
Copy link
Member Author

Do not merge until demo project is ready

@mmabrouk mmabrouk force-pushed the feat/add-demo-project-choice-to-onboarding-screen branch from 4dfa2a7 to 0d57ead Compare January 26, 2026 18:14
@mmabrouk mmabrouk changed the base branch from feat/add-multi-orgs-domains-and-sso to feat/widget-onboarding January 26, 2026 18:15
@CLAassistant
Copy link

CLAassistant commented Jan 26, 2026

CLA assistant check
All committers have signed the CLA.

- Create EE GetStarted component with 'Explore demo workspace' option
- Remove redundant OnboardingScreen from PostSignupForm
- PostSignupForm now redirects to /get-started after survey
- Keep Layout.tsx demo banner and project state changes
The Agenta logo image has aspect ratio 2.96:1 (2605x880 pixels).
Changed height from 40 to 39 for width=114 to match the correct
aspect ratio and prevent slight horizontal squishing.

Affected pages:
- get-started (OSS and EE)
- auth page
- post-signup form
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View issue and 4 additional flags in Devin Review.

Open in Devin Review

Comment on lines +154 to +155
onOk={closeDemoReturnModal}
onCancel={closeDemoReturnModal}

Choose a reason for hiding this comment

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

🟡 Modal 'Got it' button incorrectly dismisses hint permanently

Both the 'Got it' (OK) and 'Do not show again' (Cancel) buttons in the demo return modal call the same closeDemoReturnModal function, which sets demoReturnHintDismissed to true. This means clicking 'Got it' will permanently dismiss the modal, making it behave identically to 'Do not show again'.

Click to expand

Expected vs Actual Behavior

Expected:

  • 'Got it' should only close the modal for this session (user may see it again next time)
  • 'Do not show again' should permanently dismiss the modal

Actual:
Both buttons permanently dismiss the modal because they both call:

const closeDemoReturnModal = useCallback(() => {
    setDemoReturnModalOpen(false)
    setDemoReturnHintDismissed(true)  // Always sets dismissed to true
}, [setDemoReturnHintDismissed])

This contradicts the PR's test plan which states:

  • "Dismiss modal → verify navigates to last used real workspace"
  • "Re-enter demo → verify 'Do not show again' dismissal is respected"

Impact

Users who click 'Got it' expecting to see the hint again later will never see it, breaking the intended UX flow where only explicit 'Do not show again' should permanently suppress the modal.

Recommendation: Create separate handlers for onOk and onCancel. The onOk handler ('Got it') should only close the modal without setting demoReturnHintDismissed, while onCancel ('Do not show again') should set demoReturnHintDismissed to true:

const handleOk = useCallback(() => {
    setDemoReturnModalOpen(false)
}, [])

const handleDoNotShowAgain = useCallback(() => {
    setDemoReturnModalOpen(false)
    setDemoReturnHintDismissed(true)
}, [setDemoReturnHintDismissed])

Then use onOk={handleOk} and onCancel={handleDoNotShowAgain}.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

fix(frontend): correct logo aspect ratio
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 27, 2026
@bekossy bekossy merged commit 7d26514 into feat/widget-onboarding Jan 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants