Skip to content

feat(org): organization surface, app entry, and shared rail chrome - #7565

Closed
emir-karabeg wants to merge 2 commits into
stagingfrom
feat/org
Closed

feat(org): organization surface, app entry, and shared rail chrome#7565
emir-karabeg wants to merge 2 commits into
stagingfrom
feat/org

Conversation

@emir-karabeg

Copy link
Copy Markdown
Collaborator

Summary

Adds the organization surface at /o/[organizationId]: the viewer's own view of one organization, outside any workspace, gated on membership. Authenticated users with an organization now land here from / and /home; everyone else keeps landing in their workspace.

Surface and chrome

  • OrganizationLayout resolves the organization and the viewer's standing on the server, denies non-members explicitly rather than redirecting, and mounts the shared WorkspaceChrome with an OrganizationSidebar.
  • WorkspaceChrome takes its rail as a sidebar prop and exposes collapse and peek state through useSidebarChrome, so the workspace and organization rails are the same construction with different contents. The rail and the content pane now meet on a single hairline divider with no gutter or radius, and nothing in the chrome animates.
  • Sidebar defaults move to 256px with a 400px ceiling, defined once in getMaxSidebarWidth and mirrored by the pre-paint script. Workspace and organization identity tiles are neutral (--surface-6); the workspace color column stays in the DB but is no longer written or read by the UI.
  • App entry paths (APP_ENTRY_PATH, WORKSPACES_PATH, organizationRoutes, isAppSurfacePath) live in lib/navigation/paths.ts, and every post-auth redirect, OAuth callback, billing return, invitation, and desktop route reads them instead of a literal /workspace.

Organization pages

  • Home: the workspace chat's empty state, copied rather than imported — greeting, composer controls, and a "Get started" list whose steps show a ring that fills with a check once done. "Create a workspace" reads the organization's real workspace list; the other steps wait on their signals.
  • Integrations, Skills, and Workspaces render through one OrganizationPage shell: the workspace's top header bar, a fixed title/description/tabs/search/action header in the home reading column, and a scroll region with the sidebar's edge fade. The active tab and search text live in the URL (tab, q) via nuqs and are read back through useOrganizationPageFilters, so a tab switch keeps the criteria and the open field. Page content is intentionally empty; wiring follows in later PRs.

Shared primitives

  • emcn gains useScrollEdges + scrollFadeClass / scrollFadeAttributes, the canonical scroll-region edge fade (12px, only while content is hidden past that edge, never at rest), now with a horizontal axis (axis: 'x', scrollFadeXClass). Applied to both sidebars, the workspace switcher list, the command palette, and the page shell's tab row. Documented in .claude/rules/emcn-components.md and sim-styling.md.
  • New emcn icons Workspaces and Slash in the house style; a shared IdentityTile; --brand-blue joins the brand tokens as the one blue for progress and completion states.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation
  • Other: ___________

Testing

Ran locally on this branch:

  • bunx biome check clean across the touched paths.
  • tsc --noEmit clean for apps/sim (outside the pre-existing lib/internal/cloudtrail errors from a missing @aws-sdk/client-cloudtrail install), packages/emcn, and apps/desktop.
  • Vitest: full apps/sim suite passes except two pre-existing environmental failures untouched here (lib/oauth/oauth.test.ts sqlite dialect, an egress network probe timeout); apps/desktop 1552 tests; emcn hook and scroll-fade suites. New tests cover the organization layout gate, the chats section, the workspaces rail flyout, app-entry resolution, path helpers, the horizontal scroll-edge axis, and the updated desktop title-bar surface invariants.
  • Audits: check:api-validation, check:boundaries, check:client-boundary, check:react-query, check:bare-icons, check:import-specifiers, check:utils, check:source-text, check:realtime-prune all pass.

Not verified in a browser from this environment; the in-app preview could not run because local node_modules lag the lockfile.

What reviewers should focus on:

  • The / and /home landing change in resolveAppEntryPath and resolveOrganizationLanding, and the sweep of post-auth redirects to APP_ENTRY_PATH.
  • The WorkspaceChrome refactor: the sidebar prop, the removed collapse/expand transitions, and the flush pane divider (the desktop title-bar audit test was updated to match).
  • The workspace color removal from the contract, routes, and create path.
  • The emcn scroll-edge fade primitive and its adoption in the existing sidebars and command palette.

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)

Screenshots/Videos

Not captured from this environment. The organization home, the Integrations/Skills/Workspaces shell, and the collapsed rail with the Workspaces flyout are the surfaces to screenshot.

Adds the organization view at /o/[organizationId] — the viewer's own view of one
organization outside any workspace — and makes it the default landing for anyone
who belongs to an organization.

Organization surface
- Membership-gated layout with an explicit denial for non-members
- Sidebar mirroring the workspace rail: org header (empty menu for now), Search
  and Collapse, Home / Integrations / Skills / Workspaces tabs, Chats section,
  profile + help footer; the Workspaces tab grows a rail flyout when collapsed
- Empty pages for home, integrations, skills, workspaces, and chat/[chatId]

App entry
- New /home route resolves on the server to the organization home or the
  workspace picker; /o resolves the same way
- Every default post-auth destination now points at APP_ENTRY_PATH via
  lib/navigation/paths (proxy, login/signup/SSO/verify, OAuth callbacks,
  billing return URLs, invites, impersonation, emails, desktop start route)

Shared chrome
- WorkspaceChrome takes its sidebar as a prop and exposes collapse/peek state
  through a context, so both surfaces share one shell
- Flat hairline divider between rail and pane; no gutter, no radius, and no
  layout transitions on collapse, fullscreen, or disclosure
- emcn useScrollEdges + scrollFadeClass: one scroll-edge fade that only fires
  while content is hidden past an edge; dividers move to the neighboring block
- IdentityTile replaces every workspace/org avatar; no per-entity color in the
  product (the DB column stays), Workspaces icon drawn in the house style
- Sidebar default width 256px, capped at 400px; SidebarTooltip, isNavItemActive,
  getWorkspaceInitial, and the help URLs extracted to shared modules
Organization home gets the workspace chat's empty state, copied rather
than imported: the greeting, the composer with its resource, attachment,
skill, voice, and send controls, and a "Get started" list in the
suggested-actions chrome. Each step carries a ring that fills with a
check once done; "Create a workspace" reads the organization's real
workspace list, the rest wait on their signals.

Integrations, Skills, and Workspaces render through one OrganizationPage
shell: the workspace's top header bar, a fixed title/description/tabs/
search/action header in the home reading column, and a scroll region
with the sidebar's edge fade and padding. The active tab and the search
text live in the URL (`tab`, `q`) and are read back through
useOrganizationPageFilters, so a tab switch keeps the criteria and the
open field. Search expands leftward into a ChipInput with the canonical
quiet icon close button.

The emcn scroll-edge fade gains a horizontal axis (useScrollEdges
`axis: 'x'`, scrollFadeXClass) so the tab row scrolls under a fade when
it meets the controls beside it. `--brand-blue` joins the brand tokens
as the one blue for progress and completion states.
@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 7, 2026 4:14pm UTC

Request Review

@waleedlatif1

Copy link
Copy Markdown
Collaborator

squashed into #7477

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