Skip to content

fix(interfaces): pin deployed chat + resume to light mode, emcn-only components#5336

Open
TheodoreSpeaks wants to merge 3 commits into
stagingfrom
fix/deploy-chat-ui-light
Open

fix(interfaces): pin deployed chat + resume to light mode, emcn-only components#5336
TheodoreSpeaks wants to merge 3 commits into
stagingfrom
fix/deploy-chat-ui-light

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • Deployed chat rendered dark for everyone: the overlay hard-coded a dark class and styled itself with the retired static-dark --landing-* tokens, overriding the ThemeProvider's forced-light on /chat + /resume. Overlay now pins light and uses platform tokens — never follows the visitor theme
  • Swapped the white sim-landing.svg wordmark for wordmark-dark.svg in the chat header to match the light surface
  • Replaced non-design-system components: legacy @/components/ui Button/Select, hand-rolled buttons in the composer/error state → emcn Button, ChipSelect, ChipInput, ChipTextarea
  • Resume page: dropped the redundant landing Navbar (the interfaces shell already provides the light logo chrome), converted all inline style={{}} to Tailwind + platform tokens
  • Markdown renderer aligned to the platform Chat conventions (token-based, light code blocks, dashed-underline links)

Type of Change

  • Bug fix

Testing

Tested manually. bun run lint:check, bun run type-check, bun run check:api-validation:strict, and interfaces vitest suite all pass; no --landing-* tokens or dark: variants remain under app/(interfaces).

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 1, 2026 10:36pm

Request Review

@cursor

cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Presentation and component-library alignment only; resume form and chat API behavior are unchanged aside from equivalent emcn inputs.

Overview
Deployed chat and voice overlays no longer force dark or --landing-* tokens; they pin light and use platform tokens (--bg, --text-primary, --surface-*) so the UI stays light regardless of visitor theme. Loading shells follow the same treatment.

Across chat UI, raw <button> elements and @/components/ui controls are replaced with @sim/emcn Button (composer, error state, scroll, copy/download). The header swaps the static landing SVG for SimWordmark, and assistant markdown moves off gray/dark: styling to token-based typography, tables, and light code blocks with dashed-underline links.

The resume execution page drops the extra landing Navbar and footer (shell already frames the route), replaces shadcn Select/Input/Textarea with ChipSelect/ChipInput/ChipTextarea, wires field error states into chips, and rewrites layout from inline styles to Tailwind + platform tokens.

Reviewed by Cursor Bugbot for commit 862cb8c. Bugbot is set up for automated code reviews on this repo. Configure here.

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a66f4f2. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug where the deployed chat overlay and resume page rendered in dark mode for all visitors, because the root containers were hard-coded with class="dark" and --landing-* CSS tokens. The fix swaps those to class="light" + platform tokens, which works correctly via the tailwind.config.ts .light island exclusion combined with next-themes' forced-light on /chat and /resume paths. The migration also replaces legacy @/components/ui and inline <button> elements with emcn components throughout the interfaces subtree.

  • Swaps darklight class and --landing-* → platform tokens in the chat overlay, voice interface, loading states, and all sub-components, eliminating the dark-mode override.
  • Removes the landing Navbar from the resume page and converts all style={{}} to Tailwind; replaces @/components/ui Select/Input/Textarea with emcn ChipSelect/ChipInput/ChipTextarea.
  • All --landing-* tokens and dark: variants have been purged from app/(interfaces), and the wordmark-dark.svg replaces the white sim-landing.svg in the chat header to match the light surface.

Confidence Score: 5/5

Safe to merge — the change is a targeted token/class migration with no logic mutations; the theme fix is verified by the tailwind.config.ts light-island mechanism and next-themes forced-light on these routes.

All changes are mechanical token and component-library substitutions. The dark → light class swap is correct: tailwind.config.ts excludes dark: variants inside .light islands, and next-themes already forces light on html for these routes, so platform tokens resolve to their light-mode values throughout the overlay. No data flow, API contracts, or business logic were touched.

No files require special attention; resume-page-client.tsx has the largest surface area but the changes are purely presentational.

Important Files Changed

Filename Overview
apps/sim/app/(interfaces)/chat/[identifier]/chat.tsx Core fix: dark → light class, --landing-bg/--landing-text → --bg/--text-primary
apps/sim/app/(interfaces)/chat/[identifier]/loading.tsx Same dark→light class fix as chat.tsx applied to the skeleton loading shell
apps/sim/app/(interfaces)/chat/components/input/input.tsx Landing tokens replaced with platform tokens; native buttons migrated to emcn Button with appropriate variants
apps/sim/app/(interfaces)/chat/components/message/components/markdown-renderer.tsx All gray/dark color classes replaced with platform tokens; code blocks switched to light-surface styling
apps/sim/app/(interfaces)/resume/[workflowId]/[executionId]/resume-page-client.tsx Landing Navbar removed, all inline style={{}} converted to Tailwind, legacy Select/Input/Textarea swapped for emcn ChipSelect/ChipInput/ChipTextarea; support-email footer also dropped alongside brandConfig removal
apps/sim/app/(interfaces)/chat/components/voice-interface/voice-interface.tsx Dark→light class fix, landing tokens replaced, Button import migrated from @/components/ui to @sim/emcn
apps/sim/app/(interfaces)/chat/components/message/message.tsx Token migration complete; native button → emcn Button with ghost-secondary variant for copy action
apps/sim/app/(interfaces)/chat/components/header/header.tsx Landing tokens → platform tokens; sim-landing.svg (white) swapped for wordmark-dark.svg to match light surface

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    TP["ThemeProvider\n(next-themes)\nforcedTheme='light'\non /chat + /resume"]
    HTML["html class='light'\n(no .dark on these paths)"]
    TP --> HTML
    subgraph chat["Chat Overlay (fixed inset-0 z-100)"]
        OLD["OLD: class='dark'\n--landing-bg / --landing-text\n(static dark colours)"]
        NEW["NEW: class='light'\n--bg / --text-primary\n(platform light tokens)"]
    end
    subgraph tw["tailwind.config.ts darkMode"]
        ISLAND["dark: variants apply inside .dark\nexcluding .light islands"]
    end
    HTML --> chat
    NEW --> tw
    tw --> TOKENS["emcn dark: variants\nsafely excluded inside .light island"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    TP["ThemeProvider\n(next-themes)\nforcedTheme='light'\non /chat + /resume"]
    HTML["html class='light'\n(no .dark on these paths)"]
    TP --> HTML
    subgraph chat["Chat Overlay (fixed inset-0 z-100)"]
        OLD["OLD: class='dark'\n--landing-bg / --landing-text\n(static dark colours)"]
        NEW["NEW: class='light'\n--bg / --text-primary\n(platform light tokens)"]
    end
    subgraph tw["tailwind.config.ts darkMode"]
        ISLAND["dark: variants apply inside .dark\nexcluding .light islands"]
    end
    HTML --> chat
    NEW --> tw
    tw --> TOKENS["emcn dark: variants\nsafely excluded inside .light island"]
Loading

Reviews (2): Last reviewed commit: "fix(interfaces): review feedback — formE..." | Re-trigger Greptile

Comment thread apps/sim/app/(interfaces)/chat/components/input/input.tsx
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile review

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile review

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