Skip to content

Add Onboarding Flows to Preview Server#2960

Merged
sawka merged 10 commits intomainfrom
copilot/add-onboarding-preview-page
Mar 2, 2026
Merged

Add Onboarding Flows to Preview Server#2960
sawka merged 10 commits intomainfrom
copilot/add-onboarding-preview-page

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

FilesPage was previously previewed through a special path because EditBashrcCommand (Monaco via CodeEditor) threw in preview mode. With preview/global handling now fixed, preview can run the real Files onboarding flow end-to-end without command overrides.

  • Files preview now uses the real FilesPage path

    • OnboardingPreview renders FilesPage directly.
    • Removed preview-only command injection/override behavior for Files onboarding.
  • Reverted FilesPage customization

    • Dropped optional command renderer plumbing added for preview.
    • Restored FilesPage to its original internal command rotation:
      EditBashrcCommand -> ViewShortcutsCommand -> ViewLogoCommand.
  • Result

    • No Files-specific preview fork remains.
    • Preview and production use the same FilesPage command lifecycle.
const commands = [
    (onComplete: () => void) => <EditBashrcCommand onComplete={onComplete} />,
    (onComplete: () => void) => <ViewShortcutsCommand isMac={isMac} onComplete={onComplete} />,
    (onComplete: () => void) => <ViewLogoCommand onComplete={onComplete} />,
];

Onboarding FilesPage preview using default commands


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 28, 2026

Deploying waveterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: a143bc9
Status: ✅  Deploy successful!
Preview URL: https://aade703a.waveterm.pages.dev
Branch Preview URL: https://copilot-add-onboarding-previ.waveterm.pages.dev

View logs

Copilot AI changed the title [WIP] Add onboarding preview page for multiple screens Add unified onboarding preview page with in-file preview-safe variants Feb 28, 2026
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Copilot AI changed the title Add unified onboarding preview page with in-file preview-safe variants Consolidate onboarding previews and make preview host scrollable Feb 28, 2026
Copilot AI and others added 2 commits February 28, 2026 20:44
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Copilot AI changed the title Consolidate onboarding previews and make preview host scrollable Make onboarding preview scrollable and move preview-only wrappers out of app code Feb 28, 2026
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Copilot AI changed the title Make onboarding preview scrollable and move preview-only wrappers out of app code Align onboarding preview with real flow components and remove FilesPage special-casing Feb 28, 2026
Copilot AI changed the title Align onboarding preview with real flow components and remove FilesPage special-casing Remove FilesPage preview special-casing and restore default command flow Feb 28, 2026
@sawka sawka changed the title Remove FilesPage preview special-casing and restore default command flow Add Onboarding Flows to Preview Server Mar 2, 2026
@sawka sawka marked this pull request as ready for review March 2, 2026 18:39
@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 2, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (8 files)
  • frontend/app/monaco/monaco-react.tsx - Monaco editor cleanup improvements
  • frontend/app/onboarding/onboarding-features.tsx - Component exports and cleanup
  • frontend/app/onboarding/onboarding-upgrade-patch.tsx - Export version config
  • frontend/app/store/global.ts - Preview window guards
  • frontend/preview/preview.tsx - Layout adjustments
  • frontend/preview/previews/onboarding.preview.tsx - New preview component
  • frontend/util/endpoints.ts - Preview window guards
  • frontend/util/util.ts - Export NullAtom

Review Notes

This PR adds an onboarding preview page and makes the necessary infrastructure changes to support preview windows:

✅ Good practices observed:

  • Monaco editor cleanup properly calls setModel(null) before disposal (prevents memory leaks)
  • Preview window guards consistently use NullAtom for Jotai atoms and early returns for side effects
  • Removed unused state variable (key in FilesPage)
  • Changed <p> to <div> to fix HTML nesting validation (inline elements inside <p>)
  • Components properly exported for reuse in preview
  • Preview system auto-discovers the new onboarding.preview.tsx file

Architecture:

  • The isPreviewWindow() guards prevent preview windows from accessing backend services (RPC, telemetry, settings)
  • NullAtom provides a safe fallback for Jotai atoms in preview context
  • Layout changes in preview.tsx improve scrolling behavior for the onboarding preview

All changes are consistent with the codebase patterns and properly handle the preview window isolation.

@sawka sawka merged commit 95a97ca into main Mar 2, 2026
10 checks passed
@sawka sawka deleted the copilot/add-onboarding-preview-page branch March 2, 2026 19:06
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.

2 participants