Skip to content

feat(onboarding): update onboarding ui#2987

Open
rafavalls wants to merge 3 commits intomainfrom
rafavalls/onboarding-ux
Open

feat(onboarding): update onboarding ui#2987
rafavalls wants to merge 3 commits intomainfrom
rafavalls/onboarding-ux

Conversation

@rafavalls
Copy link
Copy Markdown
Collaborator

@rafavalls rafavalls commented Apr 1, 2026

Summary

  • Add brand_context column to organization_settings (migration 063) for storing org-level brand metadata (name, domain, colors, fonts, images)
  • Implement ORGANIZATION_SETTINGS_GET / ORGANIZATION_SETTINGS_UPDATE MCP tools with brand context support
  • Add Brand Context settings page under Settings > Context with display for company overview, logos, fonts, colors, and images
  • Add dynamic buildBrandContextPrompt() that accepts brand data as a parameter for decopilot prompt injection
  • Add /onboarding route with email-based org detection (corporate vs generic domain) and org creation flow

Test plan

  • Run migration 063 and verify brand_context column is added
  • Call ORGANIZATION_SETTINGS_UPDATE with brand context payload and verify it persists
  • Call ORGANIZATION_SETTINGS_GET and verify brand context is returned
  • Navigate to Settings > Context and verify page renders (empty state when no brand context)
  • Navigate to /onboarding and verify the email flow works (generic email → manual org name, corporate email → domain detection)
  • Verify buildBrandContextPrompt() returns empty string for null and formatted prompt for valid brand data

🤖 Generated with Claude Code


Summary by cubic

Add org-level Brand Context with storage, tools, settings UI, and prompt injection, plus a redesigned onboarding flow that auto-detects or creates organizations, imports brand data from a website, and supports inline brand editing during setup.

  • New Features

    • Brand Context in org settings with tools ORGANIZATION_SETTINGS_GET and ORGANIZATION_SETTINGS_UPDATE, and a new page at /$org/settings/brand-context to view and edit company overview, logos, colors, fonts, and images.
    • buildBrandContextPrompt() injects brand identity into decopilot prompts.
    • Onboarding at /onboarding: email domain detection with existing-org join or domain claim and workspace creation, optional ?email override for testing, website import to prefill brand context, and inline brand preview/edit before continuing.
  • Migration

    • Run 063-brand-context to add brand_context to organization_settings.

Written for commit a4a6eae. Summary will update on new commits.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Release Options

Suggested: Minor (2.258.0) — based on feat: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.257.1-alpha.1
🎉 Patch 2.257.1
❤️ Minor 2.258.0
🚀 Major 3.0.0

Current version: 2.257.0

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 14 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/mesh/src/api/routes/decopilot/constants.ts">

<violation number="1" location="apps/mesh/src/api/routes/decopilot/constants.ts:170">
P2: Normalize `brand.domain` before composing URLs; otherwise values that already include a scheme produce malformed URLs.</violation>
</file>

<file name="apps/mesh/src/web/routes/onboarding.tsx">

<violation number="1" location="apps/mesh/src/web/routes/onboarding.tsx:64">
P2: `handleEmailSubmit` is never called, so the onboarding flow never transitions out of the initial "gathering" state. Add a trigger (button/form submission or auto-run once a session is available) to start the email-based flow; otherwise the page is stuck.</violation>
</file>

<file name="apps/mesh/src/web/views/settings/org-brand-context.tsx">

<violation number="1" location="apps/mesh/src/web/views/settings/org-brand-context.tsx:294">
P2: The page renders "No brand context" while the settings query is still loading or has failed, masking query state and misleading users.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

You are assisting the team at ${brand.name}. Always use this context to inform your responses — never call tools to look up information that is already provided here.

Company: ${brand.name}
Website: https://${brand.domain}
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 1, 2026

Choose a reason for hiding this comment

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

P2: Normalize brand.domain before composing URLs; otherwise values that already include a scheme produce malformed URLs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/src/api/routes/decopilot/constants.ts, line 170:

<comment>Normalize `brand.domain` before composing URLs; otherwise values that already include a scheme produce malformed URLs.</comment>

<file context>
@@ -143,6 +143,40 @@ Focus exclusively on:
+You are assisting the team at ${brand.name}. Always use this context to inform your responses — never call tools to look up information that is already provided here.
+
+Company: ${brand.name}
+Website: https://${brand.domain}
+Domain: ${brand.domain}
+Overview: ${brand.overview}
</file context>
Fix with Cubic

)}
</div>

{brand ? <BrandKitDisplay brand={brand} /> : <EmptyState />}
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 1, 2026

Choose a reason for hiding this comment

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

P2: The page renders "No brand context" while the settings query is still loading or has failed, masking query state and misleading users.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/src/web/views/settings/org-brand-context.tsx, line 294:

<comment>The page renders "No brand context" while the settings query is still loading or has failed, masking query state and misleading users.</comment>

<file context>
@@ -0,0 +1,300 @@
+              )}
+            </div>
+
+            {brand ? <BrandKitDisplay brand={brand} /> : <EmptyState />}
+          </div>
+        </Page.Body>
</file context>
Fix with Cubic

rafavalls and others added 3 commits April 10, 2026 14:48
…ing route

- Add brand_context column to organization_settings (migration 063)
- Implement OrganizationSettingsStorage get/upsert with brand context
- Add ORGANIZATION_SETTINGS_GET/UPDATE tools with brand context support
- Add Brand Context settings page under Settings > Context
- Add dynamic buildBrandContextPrompt() for decopilot prompt injection
- Add onboarding route with email detection and org creation flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rafavalls rafavalls force-pushed the rafavalls/onboarding-ux branch from 3756622 to a4a6eae Compare April 10, 2026 19:04
@rafavalls rafavalls changed the title feat(onboarding): add brand context storage, settings UI, and onboarding route feat(onboarding): update onboarding ui Apr 10, 2026
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