Skip to content

[DO NOT MERGE] Org project view on the org routes: dev branch for Theo and Marcus - #8464

Draft
mzxchandra wants to merge 83 commits into
stagingfrom
feat/org-project-routes
Draft

mzxchandra wants to merge 83 commits into
stagingfrom
feat/org-project-routes

Conversation

@mzxchandra

Copy link
Copy Markdown
Contributor

Do not merge. Not for review. This draft exists only so Theo and Marcus can share and test the org project view while it is in development. It replaces the earlier dev PR #8454.

Stacked on #8433 (feat/org-project-view).

What is here

The org project view now lives on the real organization surface instead of /playground/org, entirely behind the org-project-view flag. With the flag off, the org surface is unchanged.

  • Home (/o/<org>/home): the product's Home, with a project picker. Build with a project picked opens that project's chat; Search, Plan and "No project" behave exactly as today.
  • Sidebar: Projects (one per workspace fork lineage, with their chats, rename, pin, drag and a row menu) replace Workspaces, and Home reads as New chat.
  • Project main view (/o/<org>/p/<workspaceId>/{dashboard,changelog,issues,environments}): dashboard files and a Runs dashboard, the Environments tab for forks and resource mappings, and empty states for Changelog and Issues until those entities exist.
  • Build view: /workspace/<id>/... swaps its sidebar for the project Build sidebar, /workspace/<id>/w is a foldered Workflows page, and the canvas has a location bar.

The playground prototype and its mock data are removed. Issues and Changelog plug in behind the empty states when the real entities land.

Running it locally

Set ORG_PROJECT_VIEW=true, plus FORKING_ENABLED=true and NEXT_PUBLIC_FORKING_ENABLED=true for the Environments tab. Open /o/<org>/home.

🤖 Generated with Claude Code

TheodoreSpeaks and others added 30 commits September 25, 2026 11:57
Dashboards are now ordinary workspace files, handled like Sim pages, instead
of a separate resource. Creating or uploading `<Name>.dashboard` drops the
suffix and stamps `text/x-sim-dashboard`; the type is sticky across content
writes. The file viewer renders it live behind the `dashboards` flag, and the
public share viewer shows a workspace-only notice.

- Remove the dashboard resource: sidebar page, API routes, hooks, contracts,
  application layer, Mothership dashboards/dashboard_folders tools, resource
  tags, and the per-turn dashboardsEnabled payload.
- Revert the file discovery column (0385) and drop the dashboard folder
  resource enum (0384); dashboards never shipped, so no backfill.
- Chat panel decides previewability and tab/picker icons from the file type,
  not the name, so extensionless dashboards render and get the chart icon.
- Renderer: authored left label columns are kept intact, horizontal bar
  frames grow with row count, and hovered rows get a label-and-bar highlight.
- Simplify the create-dashboard skill around one validated example.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
Resolves conflicts in the feature-flag and skill use-case tests (moved onto
staging's central mocks) and the tab strip widths. Adapts the branch's
dashboard and analytics tests to staging's test-pattern audit, scopes the
table operation delegation invariant to operations that admit delegated
principals, and hides the rollout-gated create-dashboard built-in from the
organization composer when the dashboards flag is off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
- Size horizontal bar `.chart` previews by category count like dashboard panels.
- Keep the ECharts label column for percentage bar widths, resolve percentage
  grid insets for the row highlight, and keep the time axis on the queried range.
- Show small readout values with significant digits instead of rounding to 0.
- Pass the dashboard's timezone-adjusted today to the range calendar.
- Decide the Chat panel's Markdown mode from the file record.
- Replace mock-call assertions in the EChartsView tests with DOM behavior.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
… resizes

Unstacked bar series sit side by side in a category row, so grouped charts keep
the ECharts label column and their rows fit every bar slot. The row highlight
redraws the active row after each render, so a resize moves it with the plot.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
…verride

Chart tooltip defaults now apply to every entry of an authored `tooltip`
array instead of replacing it with one object. Restore the v2 chat payload
to staging: the hard-coded `mode: 'agent'` came from the removed dashboard
resource work and would overwrite a resumed chat's saved mode.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
Grouped horizontal bar rows now size their gap from the series `barGap` the way
ECharts does (pixels, a percentage of bar width, default 20%, overlap for
negative gaps) instead of a fixed 4px.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
…resh through the UI

Pie tooltips encoded by dimension index now use the custom formatter, resolving
the measure through the encode indexes ECharts passes it. The dashboard preview
test drops the mocked controls and callback-driven cases and clicks the real
Refresh button to check which analytics queries are invalidated; the range and
timezone math stays covered by the time tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
Multi-axis bar charts now read the tooltip unit from the axis each series is
plotted on, so a secondary axis no longer inherits the first axis's format.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
Removes assertions on mocked collaborators and rendered text from the
dashboard, chart and analytics tests per the repository testing rules, keeping
the observable checks (status codes, thrown errors, DOM roles, computed
summaries, emitted zoom ranges). Deletes the animated-number test, which had
no behavior left to assert.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
…pragmas

The shared Vitest config already resets mocks and stubbed globals before each
test and defaults to the node environment.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
…Pages

Drop the create-dashboard built-in skill and its rollout gating in the skill
lists. Mothership now learns the dashboard format from a sim-dashboards
reference in its own research-and-deliverables skill, the pattern Sim Pages
use; Sim workspace built-ins stay Agent-block documents. The dashboards flag
still gates the viewer and table analytics.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
The v2 file create, replace and edit responses now carry `diagnostics` for a
dashboard file: its parse errors, or an empty list. Writes are never blocked,
like the page lint; table columns and queries are still checked when panels
render. Parse errors are reported as `path: message` lines, and a block with
no recognized kind names the allowed kinds and unknown keys instead of Zod's
union dump.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
…create revision

- One diagnostics entry per parse error instead of a newline-joined string.
- A panel choosing aggregate or columns drops the other mode's inherited
  dashboard fields, so shared defaults serve table and aggregate panels.
- The v2 create response returns the revision it produced, like the replace and
  edit responses.
- The analytics route test uses the shared createMockRequest helper.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
…ap diagnostics size

A panel switching away from the dashboard's query mode no longer inherits its
sort or limit, which name aggregate aliases or top-N groups in one mode and
rows in the other. Write diagnostics check the 128 KB source limit before
decoding the payload.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
Mock-data prototype at /playground/org (gated by NEXT_PUBLIC_ENABLE_PLAYGROUND):
projects with their chats in the sidebar, a Codex-style new-chat home with a
project picker, per-project changelog (next release, running agents, shipped
releases with charts), Sim issues with investigation briefs linked to
Linear/Jira tickets, a floating chat bar, and prod settings sections.

Adds an optional TableAnalyticsSourceContext so the dashboard renderer can run
on mock rows, and a title slot on DashboardPreview for a dashboard switcher.
Both default to existing behavior.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DeA8zbNdZMuB1MSNbcH6p6
…side chat

The project main view shows Dashboard, Changelog, and Issues; "Open full view"
switches the sidebar to the project's sections, and Settings swaps it again to
the settings list. Chats open in a left side panel.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DeA8zbNdZMuB1MSNbcH6p6
Projects are the logged-in user's real workspaces; chats, workflows,
files, tables, knowledge bases, logs and integrations come from the
workspace's own React Query hooks and open the real pages. The side
chat and new-chat home run the real Sim Chat over useChat, with a
syncChatUrl option so the panel keeps its own URL. Dashboards render
real dashboard files live plus a built-in Runs dashboard from the logs
stats route. Issues and Changelog stay mock through per-project overlay
packs matched by workspace name, and issue resource chips resolve to
the real resource with the same name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… into next release

A pack now matches on the workspace's workflow names before its name, so
the demo project picks up its pack whatever the workspace is called. The
next-release card received the project id it was already using.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…t description

The message handed from the home composer is sent one tick after the
side chat mounts, with cleanup, so a simulated remount no longer
withdraws it. The settings General page uses the same description line
as the project header.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The pack is chosen from the workspace's workflow names, which load
after the workspace list, so an issue route now shows a loading state
until the list arrives instead of calling notFound on the fallback
pack. The needs-you badge waits the same way, and the draft chart's
release index points at its last value.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rg integrations page

Packs no real workspace claims stay in the sidebar as mock projects
with their prototype chats, rows and sample dashboards; real hooks stay
off for them. A real workspace nothing claims shows only its real
resources. Connectors renders the organization integrations component
the way the org route does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
TheodoreSpeaks and others added 2 commits October 12, 2026 12:47
The Project API listed environments by workspace id, so every client had to rebuild the
fork tree to show them. They now come back roots first, each fork right after the
environment it was forked from, siblings by name; a fork whose parent the viewer cannot see
is a root, as before. The contract documents the order, and the org project view reads it
as is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrd1NLD9qx2KBLVnw32c3E
Brings in the 9 branch-only commits from origin/feat/org-project-routes (the first 14,
the version diff and fork preview, landed on staging as #8455):

Kept, rewired onto staging's Project API (/api/projects):
- project view as a pane on organization Home, the redesigned Environments tab with
  promote/refresh, sync review, Chats section, composer, settings rendered in the pane
- create a mapped secret from a fork sync (POST /api/workspaces/[id]/fork/mapping)
- sub-agent activity and cited sources in chat
- hide-chat / expand-pane toggle on the resource panel, combined with staging's compact layout

Dropped in favour of staging's model:
- the prototype project, project_workspace and copilot_chat_project tables (migrations
  0389-0391 and the 0030 backfill), and the projects API built on them
- project-scoped permission groups, credential groups, data retention and usage
- chat project marks and the manual environment position
- the older copies of dashboards, charts and the #8455 diff work
- the single-environment invite modal, which changed inviting outside the flag

Project rows archive the project through DELETE /api/projects/[id]; sync review compares
through staging's comparison modal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrd1NLD9qx2KBLVnw32c3E
@TheodoreSpeaks
TheodoreSpeaks changed the base branch from feat/org-project-view to staging October 12, 2026 22:00
TheodoreSpeaks and others added 5 commits October 13, 2026 12:12
- New project from the sidebar and the project picker; the first environment is named "main"
- Project picker moves left of the resource tabs (TabStrip startActions) and follows the
  workspace switcher; Settings is a section tab; Chat details removed
- Environments get an emcn Branch icon instead of MCP's Server; rename moves into the
  environment card's actions menu (RowAction.focusesEditor)
- Access boundary and permission config resolve the workspace from the host context, so
  Integrations, Tables, Files and Knowledge stop hanging on "Checking access" under /o
- Resource panel: both header controls stay visible while open; expand overlays the chat
  instead of displacing it, and panel content holds its open width while collapsing
- Resource menu order moves Tests near the bottom; folders no longer list separately

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrd1NLD9qx2KBLVnw32c3E
Staging #8960 replaced the chat panel's container queries with max-md breakpoints and
useIsMobile. The panel overlay, both header controls and the sliding content keep working on
that layout: the resize hook now always records --chat-panel-width (saved width, or half the
layout) instead of relying on a 50cqw fallback. Recently Deleted takes staging's paginated
query and keeps includeChats, onViewResource and the settings workspace id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrd1NLD9qx2KBLVnw32c3E
…re the panel loads

- Drop the per-project new-chat plus from sidebar rows; the options menu stays
- Workflows list shows Deployed/Draft as plain labels instead of status dots
- Expand no longer throws while the lazy resource panel is still loading; an unloaded
  panel reserves no width

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrd1NLD9qx2KBLVnw32c3E
TheodoreSpeaks and others added 3 commits October 13, 2026 16:11
Organization chats in Build or Plan work in the organization's workspaces, but the
dashboards, tests and changelog entitlements only declared a workspace evaluator, so an
organization owner was never granted them and the worker hid those commands (for
example, the agent could not create a native dashboard from org home). Each now also
grants on the organization's rollout flag; the gated operations still check the
workspace they run against. Assistant turns are unchanged (no entitlements).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrd1NLD9qx2KBLVnw32c3E
- Environments render as a pannable canvas of workflow-style blocks; each block's
  action bar pulls, pushes, or forks, and selecting one zooms in and raises a
  details sheet (workflows, tests, resources, latest release; push/pull plus a
  menu for fork, rename, teammates, disconnect)
- Push/Pull open one pair's sync view: workflow changes with compare (or why it
  is unavailable) and a single resource-mappings table with search and the
  standard Filter popover
- Create secret in a mapping opens a modal from the target dropdown
- Project settings move to a right-side rail
- Drop the pipeline/mapping-grid implementation it replaces

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pxSxvGJLgvb3eEhgAD77h
Push and pull open the pair's sync in its own pane tab, a three-step wizard
(map resources, copy resources, review and sync) with Back/Next and Sync in
the header. Pane tabs become one typed URL list (browse and sync entries).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pxSxvGJLgvb3eEhgAD77h
Workflow tabs in the org home's resource pane render the full editor instead of
the reduced canvas. The editor draws its header into the pane (folder crumbs,
the workflow's actions on its name crumb, Live and Run) and leaves out its Chat
tab, since the pane's chat sits beside it. Editor navigation stays in the pane:
a duplicate opens as a tab, a delete closes the tab, logs and folders open the
project's Resources section. Deleting a workflow now replaces history rather
than pushing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pxSxvGJLgvb3eEhgAD77h
The project control rides a swell on the pane's top edge and, collapsed,
rests on its right edge as a vertical Project tab. A spring drives the
panel width, card insets, and swell together so the swell is measured
from the laid-out card and stays on it, including during divider drags.
With a tab active the control shrinks to its icon and expands on hover.
Drops the chat title bar above the conversation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JgeRDW6ri3zYU3ri3p7TFV
… environment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SAgnLLFBHTfcrL1e1MDvJY
Switching environments re-keyed the whole project view under a fresh
workspace host, so the title, tabs and switcher remounted behind a
skeleton. The host now wraps only the section body, and opening the
switcher prefetches each environment's host context.

Also:
- Collapsed sidebar: Projects is one rail icon whose hover flyout lists
  every project, like Workspaces and Chats.
- The project swell tab is narrower when collapsed and shows the
  project icon instead of an initial tile.
- The pane header's "View: preview" chip is the shared preview-mode
  icon toggle again, extracted so the tab strip uses the same one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pxSxvGJLgvb3eEhgAD77h
- A New tab focuses its search field; arrow keys move a highlight through
  the list and Enter opens it.
- Picking a resource from a New tab replaces that tab; selecting another
  tab no longer deletes it. The removal moved from every resource
  selection into the New tab's own open action.
- The pane-hosted workflow editor fills the block search catalog itself
  (SearchDataLoader), since the workspace sidebar that normally fills it
  never renders in the org view. Add block search found nothing before.
- The unselected project swell is lighter than a selected tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pxSxvGJLgvb3eEhgAD77h
The New tab searched by loading every environment's full resource lists
in the browser (~10 list requests per workspace) and filtering by name.
It now calls one endpoint:

GET /api/organizations/[id]/resources/search?q&types&workspaceIds&cursor
- organization.resources.search (member, session), per-user rate limit
- the viewer's accessible org workspaces, narrowed by workspaceIds
- each type gated per workspace by its own list capability; tests also
  by the workflow-tests flag (dropped when unscoped, refused when asked)
- one union over active workflows, tables, files, knowledge bases, and
  tests, each with its own list's active predicate
- earlier match first, then A→Z; keyset pages bound to the search

The New tab:
- project picker above an emcn search; results span the project's
  environments, labelled by environment, the current one first
- "← Resources" back chip inside a category
- scroll loads further pages; a Searching state until results arrive
- dashboards are no longer offered
- fixes the list's scroll container, which grew with its content and
  left everything below the fold unreachable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pxSxvGJLgvb3eEhgAD77h

This branch was previously deployed

1 inactive deployment
Preview — d1134980 Deployed Oct 16, 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