improvement(org): move the organization view onto the new design system

Merged
WA
3d ago
+28421-4413

Summary

  • Moves the organization view (/o/[organizationId]/**) onto the Platform design system: new sidebar with its tooltips and flyouts, Home, Integrations, Sim Links and Search, on styles scoped under [data-platform-ui]. No feature flag, since this view is only on for organizations already using it. Rollback is a revert
  • Home: Email, Calendar and activity widgets read the same connected accounts as Integrations. New GET /api/organizations/[id]/home/{email,calendar} go through an application use case with the same approval and permission gates as Search
  • Home for builders: the agent composer stays and the Tasks run chart is new. Suggested actions are gone from Home, to match the design; Search and the extension keep their own shortcuts
  • Home for members: on hosted, canBuild needs org admin, so most members used to redirect from Home to Search. Anyone who can use the Assistant now gets Home with the Assistant composer. New chats open under /search/chat/[id], as before
  • Search: its own page and sidebar entry. Sources in history can be removed with DELETE .../search/history/sources
  • Sim Links: stay in the sidebar, with a new page and modals. The first page renders from the server
  • Org chart: empty state says an admin needs to connect a directory
  • Loading: server prefetch hydrates the first read under a 2s budget, and sidebar destinations warm on intent. First paints are 48-284ms in CI with no duplicate reads
  • Isolation: check:platform-css fails if Platform styles escape their scope or anything outside app/o/[organizationId] reaches platform/, dynamic imports included. Files the extension imports stay Platform-free, and OrganizationConversation only gained additive props

Type of Change

  • Improvement

Testing

  • New org-redesign e2e suite in CI: 149 passing and 11 not provable, plus 8 passing with People on, across owner, admin, member, connected member and narrow group, at desktop and phone width in light and dark. It fails on any unexpected runtime error or failed same-origin request, and the reports and 376 screenshots are uploaded as artifacts
  • Existing suites on the same code: assistant-actions 24, organization-search 20, sim-links 15, people 20, scim 32, browser-extension 43, plus mobile and desktop-live
  • New home-widgets.integration.ts against real Postgres, including a non-member getting 404
  • Merged ahead of the final full CI run. The last completed org-redesign run had one failure, from an ambiguous selector in the test, since fixed. Type-check and the fast audits pass on the merged tree
  • Not exercised: real OAuth, Gmail and Calendar calls (stubbed at the browser boundary), real model streaming, and Stripe. These need a real-account smoke test on staging
  • Not provable in the suite: desktop-only rail peek, update row and OAuth listener; the impersonation banner; the Plan chip; the mic; Slack ?slack= with a valid token; the settings dirty guard. Not asserted: SSE updates, and session-only section state. The Slack, Coda and Lucid Connect paths aren't seeded

E2E assertions changed

  • organization-search: a member's agent chat URL expects 404, not a redirect. Staging also returns 404, so the old expectation was wrong
  • assistant-actions, because the UI moved:
    • Account rows replace Open X integration, /integrations/<provider> replaces ?integration=, and a Manage menu replaces Reconnect and Disconnect
    • The provider button replaces Connect, and Connect your Coda account replaces No account connected. A blocked app shows a disabled button rather than none, and still can't connect
    • Role group replaces radiogroup, and searchbox replaces textbox
    • An inline description and aria-description replace the tool info tooltip, so its hover and focus behaviour is no longer asserted
    • After a disconnect the page returns to the remaining account
  • browser-extension: additions only. sim-links, people and mobile are unchanged

Visible differences to review

  • Links: blank values show —, a row menu was added, and Learn more moved
  • Renaming a chat or workspace now opens a modal, and Search filters are selects
  • Personal Generic Secrets keeps the existing editor without the new styling
  • Icons: Links is a globe and People is an org chart
  • Dropped ?tab= from Integrations URLs. Nothing read it after the old page was removed

Known and left as is

  • Admin Home makes about 12 reads per workspace, from the unchanged Composer and available-resources.ts. This already happens on staging, and it's worth a separate fix for organizations with many workspaces
  • metadata.generated.ts is a snapshot of the Platform branch's output with no generator here. Its requested scopes match each connection's scopes today (the Google lists add openid), but nothing checks that they stay matched

Checklist

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