Skip to content

Build the Platform Core, Chat, and member integrations UI - #9687

Open
emir-karabeg wants to merge 4 commits into
stagingfrom
improvement/platform-core-chat
Open

emir-karabeg wants to merge 4 commits into
stagingfrom
improvement/platform-core-chat

Conversation

@emir-karabeg

@emir-karabeg emir-karabeg commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Home, Chat, Settings and organization integrations use the shared navigation shell and real routes in the isolated Platform Next.js app. The browser and Sim Desktop share the renderer. A default-off server fixture supplies populated, empty and stress states without a database.

The shared App Router layout owns the sidebar. Selecting a chat, visiting Settings, or reopening the compact drawer preserves the reader’s position. Command K uses the shared menu rows and headings: Home, Settings and Integrations keep their icons, and workspace and chat results are text-only. Search, results and shortcut hints align to one inset, and moving from pointer to keyboard leaves only the active result highlighted.

Home and Chat share a reading column and a Recents component. Home opens recent websites in another tab; dismissal carries into Chat. The activity chart switches between Tasks run and Searches without losing its date range. Widgets and notifications share a height ceiling and scroll independently. Calendar’s Now control returns to the current day and time. Events open an external tab only when a provider supplies a URL; attendees have their own popover.

Navigation, tabs, recents and attachment previews share ControlRow. Invite recipients use compact address tags with an always-visible remove button inside each tag. Form dialogs focus the first available field and restore focus on close. Invite accepts typed and pasted addresses, supports keyboard removal and leaves sending to Phase 3. Chat keeps prose and tool activity aligned, and shares its time formatting and copy feedback with the rest of the Platform.

The member Integrations inventory uses workspace catalog descriptions for each provider. Its detail shows the provider name and description, then one connected credential with its actions menu. The inline connection prompt shares Home’s Email and Calendar styling and links to the Sim Search setup guide. Eligible tool approvals remain individual. Known OAuth permissions are grouped by purpose and always visible. Managed Search providers show their actual read-only operations, including Fireflies meeting search, transcripts, and summaries. The server fixture flag gates all sample connections. Member inventory and operation mapping.

See the component ownership map, Platform contract and Core/Chat source-state inventory. To run locally: SIM_PLATFORM_FIXTURES=1 bun run --cwd apps/sim dev:platform; visit /home?state=full, /chat/weekly-review?state=full /settings?state=full, or /integrations?state=full.

Verification exercises the production Next build, Chromium with fixture-on and fixture-off servers, and the native Electron renderer. Browser journeys measure scroll bounds, hit targets and spacing, exercise keyboard selection and focus return, and distinguish resting/hover/pressed feedback in both themes. The design audit checks ownership, token and variant use, timers, modal chrome and the fixture boundary. It recognizes JSX returned by local render helpers and active route fallbacks. The tracked Platform skill and contract route new work, cleanup and Settings reviews to the correct component library, and distinguish shared preferences from decisions owned by one feature.

Stacked on #9667, which targets staging.

@emir-karabeg
emir-karabeg requested a review from a team as a code owner November 4, 2026 23:24
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 6, 2026 1:40am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 3/5

[Medium impact] The changes reach the standalone Platform’s Home, Chat, and Settings flows on web and Desktop.

Fix the lost Stop control and covered desktop panel tabs before merging.

Findings

  1. P1 Follow-up removes Stop ▶
  2. P1 Toolbar covers panel tabs ▶
  3. P2 Unsent messages disappear ▶
  4. P2 Saved profile edits vanish ▶
  5. P2 Navigation resets shell changes ▶

Summary

Adds standalone Home, Chat and Settings routes for browsers and Sim Desktop, with shared controls, gated fixtures and browser/Electron checks.

  • The Platform opens on Home with shared navigation and a dashboard people can customize.
  • Chat keeps drafts, attachments, and panel interactions local to the Platform session.
  • Settings adds profile, appearance, notification, and member screens to the Platform.
  • Shared controls support the new product routes, and the component workbench has its own route.
  • Build and design checks now cover the Platform product routes and Desktop renderer.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Layout["Shared ProductSession"] --> Preferences["Interface preferences"]
  Layout --> Changes["Chat edits"]
  Layout --> Page["Home, Chat or Settings page"]
  Page --> Frame["ProductFrame"]
  Frame --> Shell["PlatformShell"]
  Shell --> Local["Inbox, notices and sort state"]
  Shell --> Feature["Feature screen"]
  Feature --> Draft["Local draft or profile edits"]
Loading

Reviews (1) · Last reviewed commit: "feat(platform): build Core and Chat for ..." · Reviewed by Greptile

Comment on lines +102 to +108
onStop={
last?.response?.state === 'running' ? () => transition(last, 'stopped') : undefined
}
onSubmit={(draft) => {
const next = userTurn(draft)
if (id && !removed) {
changes.setTurnsFor(id, [...turns, next])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Follow-up removes Stop

In /chat/customer-onboarding?state=full, pressing Enter on a follow-up appends a user turn while the response is running. onStop then disappears because it checks only the last turn, which now has no response. The earlier response stays “Working” with no way to stop it. Track the running turn separately, or block submission while it is running.

Comment on lines +17 to +24
padding-inline: var(--spacing-12);
min-inline-size: 0;
height: var(--height-nav);
border-block-end: var(--spacing-stroke-default) solid var(--ui-divider);
}
:global([data-sim-desktop-title-bar]) .header {
height: var(--spacing-48);
-webkit-app-region: drag;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Toolbar covers panel tabs

With the desktop sidebar collapsed, expanding the chat panel puts its tabs under the desktop toolbar and native window buttons. The shell places the content at the top-left, but the panel header keeps only 12px of left padding. Unlike the conversation header, it does not use --ui-navigation-inset. Reserve that space when the panel takes over so its first tab and close control remain clickable.

Comment on lines +18 to +19
<ChatPanels workspaces={shell?.workspaces ?? []} data={panel} key={id?.[0] ?? 'new'}>
<ChatScreen data={data?.chat ?? null} chatId={id?.[0]} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Unsent messages disappear

Switching chats discards unsent text and selected files. MessageComposer keeps both only in local state, while this route keys the whole panel tree by chat ID. Returning to the original chat creates a fresh composer. Keep drafts in the session, keyed by chat ID, so ordinary navigation does not erase unfinished messages.

Comment on lines +20 to +21
const [displayName, setDisplayName] = useState(name ?? '')
const [picture, setPicture] = useState<string>()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Saved profile edits vanish

Saving a display name or choosing a profile picture lasts only until the user leaves Preferences. ProfileSettings owns these values locally and is removed on other Settings sections. Returning restores the fixture name and drops the picture. Keep these local edits in the session provider; no database write is needed.

Comment on lines +30 to +33
<ProductSurface preference={appearance}>
<PlatformShell data={shell} desktopTitle={desktopTitle} navigation={navigation}>
{children}
</PlatformShell>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Navigation resets shell changes

Each page creates its own PlatformShell, so moving between Home, Chat and Settings resets inbox read marks, dismissed notices and chat sorting. For example, reading an unread item, opening a chat and returning makes that item unread again. Move this session state above the page boundary, alongside the existing chat edits and interface preferences.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

6 issues found and verified against the latest diff

Confidence score: 3/5

  • chat-screen.tsx can bring submitted attachments back into the composer when the first send creates a chat. Clear the draft attachments before the route change remounts the composer.
  • recent-items.tsx leaves the remove and select controls too small to tap reliably on coarse-pointer devices. Give both controls larger hit targets.
  • workspace-list.tsx has no visible focus indicator, so keyboard users may lose track of which workspace is focused. Add a :focus-visible treatment.
  • product-surface.tsx briefly renders light for users whose system theme is dark. Resolve the system theme before first paint to avoid the flash.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/platform/design-system/components/recent-items.tsx">

<violation number="1" location="apps/sim/platform/design-system/components/recent-items.tsx:32">
P2: These new recents controls do not provide a coarse-pointer hit target: the row grows to 44px, but the remove button remains an intrinsic icon-sized target and the select button remains text-sized. Give both controls a 44px touch target, such as the existing `IconButton` touch sizing or `TouchTarget` wrapper, while preserving the row layout.</violation>
</file>

<file name="apps/sim/platform/design-system/components/workspace-list.tsx">

<violation number="1" location="apps/sim/platform/design-system/components/workspace-list.tsx:43">
P2: This new keyboard-focusable workspace button has no visible focus indicator because the global stylesheet removes outlines and `.workspaceHit` adds none. Add a shared or workspace-specific `:focus-visible` treatment so keyboard users can identify the active row.</violation>
</file>

<file name="apps/sim/platform/design-system/components/product-surface.tsx">

<violation number="1" location="apps/sim/platform/design-system/components/product-surface.tsx:10">
P2: System appearance always renders light on the server, causing dark-system users to see a light flash before hydration applies the media-query result. Resolve the system theme before first paint, such as with a CSS media-query path plus explicit-theme override or a small theme bootstrap.</violation>
</file>

<file name="apps/sim/platform/design-system/components/select.tsx">

<violation number="1" location="apps/sim/platform/design-system/components/select.tsx:37">
P2: An arbitrary `theme` query can reach this controlled value without matching any option, so the Theme picker renders blank even though the surrounding product falls back to `system`. Ignore values outside `options` here or pass the normalized theme from the settings screen.</violation>
</file>

<file name="apps/sim/platform/design-system/features/chat/chat-screen.tsx">

<violation number="1" location="apps/sim/platform/design-system/features/chat/chat-screen.tsx:100">
P2: The first send from `/chat` clears the composer only until `router.replace` changes `id`; this prop then remounts `MessageComposer` with the unchanged draft attachments, so submitted files reappear in the new chat’s composer. Track and consume the initial draft when submitting before navigation.</violation>
</file>

<file name="apps/sim/platform/design-system/components/notification-tray.module.css">

<violation number="1" location="apps/sim/platform/design-system/components/notification-tray.module.css:10">
P2: The fixed notification stack ignores the bottom safe-area inset, so its action and dismiss controls can sit under the home indicator on notched mobile browsers. Use `max(var(--spacing-20), env(safe-area-inset-bottom))` for the bottom offset.

(Based on your team's feedback about toast safe-area minimum.) [8c7692a3-398e-4004-b266-f2a76922d36c]</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

{item.label}
{onRemove ? (
<button
className={styles.removeRecent}

@cubic-dev-ai cubic-dev-ai Bot Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: These new recents controls do not provide a coarse-pointer hit target: the row grows to 44px, but the remove button remains an intrinsic icon-sized target and the select button remains text-sized. Give both controls a 44px touch target, such as the existing IconButton touch sizing or TouchTarget wrapper, while preserving the row layout.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/sim/platform/design-system/components/recent-items.tsx, line 32:

<comment>These new recents controls do not provide a coarse-pointer hit target: the row grows to 44px, but the remove button remains an intrinsic icon-sized target and the select button remains text-sized. Give both controls a 44px touch target, such as the existing `IconButton` touch sizing or `TouchTarget` wrapper, while preserving the row layout.</comment>

<file context>
@@ -25,8 +27,26 @@ export function RecentItems({ label, title = label, items }: RecentItemsProps) {
-              {item.label}
+              {onRemove ? (
+                <button
+                  className={styles.removeRecent}
+                  type='button'
+                  aria-label={`Remove ${item.label} from recents`}
</file context>
Fix with cubic

Comment thread apps/sim/platform/app/layout.tsx Resolved
@emir-karabeg emir-karabeg changed the title Build the Core and Chat UI for web and Sim Desktop Build the Platform Core, Chat, and organization integrations UI Nov 5, 2026
@emir-karabeg emir-karabeg changed the title Build the Platform Core, Chat, and organization integrations UI Build the Platform Core, Chat, and member integrations UI Nov 5, 2026
@waleedlatif1
waleedlatif1 force-pushed the improvement/platform-core-chat branch from 6133099 to 8d35586 Compare November 5, 2026 06:55
Builds on the design system already on staging: the Platform zone at /org, live data through platform/lib/data, a shared chat runtime, and the Settings, Home, Integrations, Links and People views, behind the platform-org-ui flag.

The commit-by-commit history is on backup/platform-core-chat-2026-11-05.

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
@waleedlatif1
waleedlatif1 force-pushed the improvement/platform-core-chat branch from 4b9ab5e to c8341b9 Compare November 5, 2026 23:58
@waleedlatif1
waleedlatif1 changed the base branch from improvement/platform to staging November 5, 2026 23:58
…iring

# Conflicts:
#	apps/sim/lib/assistant-actions/application/review.ts
@blacksmith-sh

blacksmith-sh Bot commented Nov 6, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
[flag-off] › platform/checks/live/flag-off/legacy-surface.spec.ts:34:7 › /o/[id]/
home stays on the main app with no redirect
View Logs
platform/checks/live/flag-off/legacy-surface.spec.ts//o/[id]/
home stays on the main app with no redirect
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

This branch was previously deployed

1 inactive deployment
Preview — 3fcc7307 Deployed Nov 6, 2026 by vercel[bot]
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