Skip to content

feat(companies): People, Integrations and Agent access as their own pages - #931

Merged
allisonmahmood merged 10 commits into
mainfrom
feat/dashboard-company
Oct 25, 2026
Merged

allisonmahmood merged 10 commits into
mainfrom
feat/dashboard-company

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

What changed

People, the agent access switch and company data sources were crowded onto one Company page, and the data sources page was called Connections, which people confused with connecting their own agent. Now each has its own page under the sidebar's Company group: People at /company, Agent access at /company/agent-access and Integrations at /company/connections. No URL changes.

  • People. The heading is "People" with a quiet "5 people · 1 admin". The toolbar has search, the tabs, and for admins an Invite people disclosure (<details>). It opens with ?invite=1 or after a refused submit, and holds the invite form with visible Emails and Role labels. Invited rows say "Invited 2 days ago · expires 24 Nov 2026". The column is Joined while every row is a join date.
  • Agent access. The page shows On or Off, who changed it and when, and one consequence sentence. Admins get Turn on/off agent access, through the same POST as before, which now redirects to this page. Members see the state and the admins' names, plus a Connect your agent link when it's on.
  • Receipts for invites ("Invited 2 people", or the address for one), resend, revoke, role changes and agent access. Partial invite failures keep their per-address notice.
  • Integrations. Every dashboard label that said "Connections" now says Integrations, and the catalogue is "Connect an integration". "Connection" stays the noun for one source. Cancel on a connect form returns to where the integration was chosen (F07): Integrations while nothing is connected, else the catalogue. Helper paragraphs are cut. Postgres prerequisites are now a short walkthrough like PostHog's (F20). Company-wide, read-only and credential consequences stay.

Addresses F05, F07, F12, F20 and F21 from the dashboard research. Stacked on #930.

Look at

Invite, then the receipt and the new rows:


Agent access as an admin right after turning it off, and as a member:


Connect Postgres: the walkthrough, and Cancel, which here returns to the empty Integrations page:

People at 390px with the invite open:

How it was verified

  • pnpm vitest run packages/companies packages/auth packages/integrations: 49 files, 427 tests pass. New tests cover:
    • Agent access as its own page: admin on/off with the stamp and receipts, and a stale toggle that reports nothing.
    • A member's GET is read-only. A member's forged POST gets a 403 and changes nothing.
    • Another company's admin only sees and toggles their own company.
    • Signed-out and deactivated people are refused on GET and POST.
    • Receipts for invite (one and many), resend, revoke and role. A refusal leaves no receipt.
    • The invite disclosure: closed by default, open with ?invite=1 and after a refusal, absent for members. The Joined/Status column.
    • Cancel's target with and without connections, including after a refused connect.
  • turbo run typecheck for companies, auth and integrations, and tsc -p tsconfig.test.json: clean. ESLint and Prettier: clean on changed files.
  • Looked at it on pnpm dev up brightline as allison (admin) and priya (member), at desktop width and at 390px.
  • Not run: pnpm verify/pnpm check (the orchestrator runs the full suite once) and the Playwright browser suite. test/browser/login-door.spec.ts now asserts the People heading and the company link. It needs live Clerk and wasn't run here.

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

Page copy and layout, plus one new GET page. Routes, POST bodies, the API and the CLI are unchanged.

  • What does a revert leave behind? Nothing. No schema, rows or mail. A receipt cookie lasts 60 seconds.
  • Does the release before it still work with that? Yes.

Made by Claude Opus 5.5 in Claude Code (T3 Code).

people-invite-phone

allisonmahmood and others added 4 commits October 25, 2026 13:43
The signed-in shell is now a sidebar of places grouped by whose thing they
are: Home, All patches, Your agents, then Company (People, Integrations,
Agent access). What's new and an account menu with Sign out sit at its foot.
On a phone the same markup opens from a Menu button as a popover.

Rows, tiles, tabs, side panels and step cards lose their hard shadows; a lit
tab or place is a pale yellow fill. URLs are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A POST that changes something can leave a one-line receipt for the person:
a short-lived HttpOnly cookie bound to them (__Host- over HTTPS) that the
next signed-in page shows at its top and clears. Agent-access links point at
the sidebar's place, and Copy buttons can name what they copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A receipt now survives redirects and fragments and is cleared by the page
that renders it; one left for someone else is dropped at once. The phone
header stays compact on short pages, the Menu sheet leaves a gutter to tap
outside at 320px, and a Menu left open while the window widens sits where
the sidebar's menu would.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ages

/company is People: an h1, a quiet count, then search, tabs and, for admins,
an Invite people disclosure holding the invite form with visible Emails and
Role labels. Invited rows say when they went out and when they lapse, and
the column is Joined while every row is a join date.

GET /company/agent-access is its own page: the state, who changed it and
when, one consequence sentence, and the switch for admins; members read it
with the admins' names. Its POST now lands back there.

Invites, resends, revokes, role changes and agent access leave receipts
named from server state. The dashboard's Connections page is Integrations,
its catalogue is Connect an integration, Cancel on a connect form returns
to where the integration was chosen, and Postgres setup is a short
walkthrough like PostHog's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:docs Touches the docs area area:integrations Company connections and integration implementations area:ui Portal and first-party browser pages, shared rendering and styles size:l 501-1,000 changed lines labels Oct 25, 2026
allisonmahmood and others added 3 commits October 25, 2026 14:23
Agent access left the People page, so an agent told to turn it on is sent to
/company/agent-access.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er a partial send

Turning agent access off now says, before the button, that every agent is
refused and no connection ends. After an invite batch that isn't fully sent,
the form stays open with its role. The publish warning and the server skill
send people to /company/agent-access.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review: GPT 6.1 Sol (xhigh). Four should-fix findings and no blockers. Three are fixed in de96e73 and one is dismissed. c16f618 also points Patchy MCP's agent-access refusal at /company/agent-access.

  1. With agent access on, nothing said what Turn off does. Fixed: admins now see "Turning it off refuses every agent at until it's back on. Nobody's connection ends." just before the button. Tested.
  2. After an invite batch that wasn't fully sent, the form closed and lost its role. Fixed: the form stays open with the chosen role. Only addresses that can be sent again stay in the box, as before. Tested.
  3. Distributed instructions still sent people to /company to turn agent access on. Fixed in two places: the server skill, and the publish warning in PatchesApi, which had the same link. Both now point at /company/agent-access, and the test is updated.
  4. Cancel on a connect form guesses its origin from the connection count. Dismissed. The empty Integrations page lists the integrations itself, so the catalogue is reachable then only by typing its URL, and both pages are one click from each other. Carrying a return parameter through the form and its refusals is more machinery than that edge case needs.

Re-ran company, companies, patches API and SDK tests: 12 files, 162 tests, plus the auth company suite (24) and the MCP door tests (24).

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked e6f5eb17c5006d09a0a214f3fe6419cdf4fb0803 (base 8051b91b276d428e1a942816a2f5797290c5a435, feat/dashboard-sidebar / #930) on brightline, by GPT-6.1 Sol in Codex (T3 Code). The head was unchanged immediately before posting. No behavior failures found.

Done means

No closing issue is linked; checked the PR's What changed and the requested acceptance cases.

  • Separate pages: passed. People, Integrations and Agent access load at their stated routes, with the corresponding sidebar selection. People has its count, search, tabs and admin-only invite disclosure; ?invite=1 opens it. Search for Priya returns her row. The open invite form remains usable at 390px; the people table scrolls within its container.
  • Invites and partial outcomes: passed. As Allison, one invite produced Invited [email protected]; two produced Invited 2 people. Invited rows show relative sent time and expiry; the column switches between Joined and Status. A mixed batch invited its new address, named the existing member and existing invite, kept the disclosure open and Admin selected, emptied addresses that cannot be retried, and set no success receipt. Targeted tests additionally passed injected save failures (503; only the unsaved address retained) and mail failures (502; saved invitation preserved).
  • Resend, revoke and roles: passed. Browser actions produced Sent a new invite to [email protected], Revoked the invite to [email protected], Jordan Lee is now an admin, and Jordan Lee is now a member. Revocation removes the row. Receipt tests passed one-time display and no receipt on refusal. Priya has no management controls; her forged invite and role POSTs return 403.
  • Agent access: passed. Allison turned it off and on; each POST redirects to /company/agent-access, shows the state receipt, and stamps Allison and the date. The on page explains what turning it off does. Priya sees the state, admin names and, while on, Connect your agent. Her forged POSTs in both directions return 403, render Agent access with the refusal, leave the state unchanged and create no receipt. Targeted tests passed company isolation, signed-out/deactivated denial, invalid state and stale submissions.
  • Integrations: passed. Admin/member views use Integrations and Connect an integration; the Postgres and PostHog forms retain the company-wide, read-only and credential consequences. A local-address Postgres attempt is refused with public_address_required; name/description remain, credentials clear, and Cancel returns to Integrations. Cancel also works from both untouched forms. The targeted connection-page test passed the populated-company destination (catalogue), including after a refused submit; successful connections use disposable test services.
  • Agent-facing links: passed. A real MCP call while off returns agent_access_off, names Allison and points to /company/agent-access. The same Priya agent token discovers all four scenario patches after access is on again. Publishing New Business through this environment's isolated CLI succeeds while off with the warning pointing at /company/agent-access; republishing while on succeeds with no warnings. The shipped server skill points there too.

Golden journeys

  • Invite and join: passed. The new address chose Join Brightline Studio and landed on Home. Allison then deactivated and reactivated that person; the People counts and Deactivated tab updated in both directions. Targeted tests passed last-admin protection, cross-company action refusal and credential revocation on deactivation.
  • Publish a page/tool: passed. New Business was republished through the scenario CLI with agent access off and on, as described above.
  • Find tools through an agent: passed. Turning access back on restored the same connection's discovery of New Business, Spend, Kudos and the kickoff page.
  • Sign-in admission: passed in targeted tests and head CI. Signed-out readers receive the door, unenrolled readers go through Join, and deactivated readers are refused. The head's browser and clerk-live checks are green.

Rollback answers: match the diff. This changes pages, receipts and guidance links, with no new migration, persistent data shape, credential format, API schema or CLI contract. Invitation mail/state changes already existed before this PR; a revert adds no new incompatibility. The base already owns the receipt mechanism and Agent access route. No one-way label is needed; rollback-rehearsal is green.

Targeted test evidence
pnpm exec vitest run \
  packages/auth/src/CompanyPage.test.ts \
  packages/integrations/src/ConnectionPages.test.ts \
  packages/integrations/src/ConnectionsView.test.ts \
  packages/mcp/src/Door.test.ts \
  packages/patches/src/PatchesApi.test.ts --maxWorkers=2

Test Files  5 passed (5)
     Tests  116 passed (116)

All 14 head CI checks were green, including browser, clerk-live, CLI smoke, tier 2 smoke, offline tests and rollback-rehearsal.

Not run

  • Full pnpm verify: intentionally omitted on this shared machine, as requested; targeted checks and head CI used instead.
  • A separate live-Clerk/mail run or a manual successful external Postgres/PostHog connection: this local instance records invitations without sending mail; fault injection and disposable integration doubles covered those paths. The head's clerk-live CI passed.

Notes

  • These are coverage limits, not observed defects. Code, PR branch, body and labels were left unchanged; no merge was performed.

Base automatically changed from feat/dashboard-sidebar to main October 25, 2026 14:55
@allisonmahmood
allisonmahmood merged commit 25de8d0 into main Oct 25, 2026
14 checks passed
@allisonmahmood
allisonmahmood deleted the feat/dashboard-company branch October 25, 2026 15:05
allisonmahmood added a commit that referenced this pull request Oct 25, 2026
…Agent access (#934)

## What changed

The docs still describe the old dashboard: a top bar with Company,
Connections and Your machines, a bell, and agent access at the foot of
the company page. This PR brings `docs/product.md`, both READMEs,
`GLOSSARY-MAP.md`, the ADR mentions, the acceptance skill and the portal
glossary's What's new entry up to the redesign in #930–#933:

- **The sidebar shell:** places grouped by scope, the account menu,
What's new at the foot, and receipts.
- **Your agents:** records first, Add a computer, Connect an app, and a
confirmation page for Disconnect everything.
- **People, Integrations and Agent access** as their own pages.
- **Titles in lists**, a single way to open a patch, and the
confirmation step before a patch goes public.

Routes are unchanged. `patchy list` still says "Connections", the CLI's
word for a configured source.

Stacked on #930. **Merge it after #931, #932 and #933**, since it
describes what they build.

## Look at

`docs/product.md`:
- **§ The portal is built:** the sidebar paragraph.
- **§ Identity and access:** Your agents.
- **§ Patchy MCP › Pages:** Connecting an agent, Agent access and Your
agents.

## How it was verified

- Prettier on every changed file.
- Grepped the stack's combined tree: no "Your machines" or
`company#agent-access` is left outside What's new history.
- Docs only: no code or tests change.

## Release impact

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required

Documentation only.

- **What does a revert leave behind?** Nothing.
- **Does the release before it still work with that?** Yes.

---
Made by Claude Opus 5.5 in Claude Code (T3 Code).

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
allisonmahmood added a commit that referenced this pull request Oct 25, 2026
…ry change (#941)

## What changed

This PR adds release 19's What's new entry, written from `156a228`. It
covers everything merged since release 18's `through` (`b23e6ad`), and
it sets the `patchy` release to `0.19.0` in
`packages/patchy/package.json` and `CURRENT_RELEASE`. With this release
the dashboard gets its redesign: a sidebar grouped by scope, Your agents
with connected things first, People, Integrations and Agent access as
their own pages, titles, and a receipt after every change.

| Change | PRs |
| --- | --- |
| Improved: A sidebar that keeps your things and the company's apart |
#930 |
| Improved: Your agents shows what's connected first | #932 |
| Improved: People, Integrations and Agent access each have a page |
#931 |
| Improved: Patches go by their real names, and one click opens them |
#933 |
| New: Patchy says what just happened | #930, #931, #932, #933 |
| Improved: Making a patch public asks first | #933 |
| Behind the scenes: agents' instructions and the docs use the new names
| #931, #932, #934 |

One merged PR gets no line: #920 is release 18's own entry. This PR also
fixes one stale line in the README ("a bell"), which #934's acceptance
verdict noted.

## Look at

- **The entry**, at the top of `releases` in
`packages/core/src/whatsNew.ts`. Its labels are the pages' own: Home,
All patches, Your agents, People, Integrations, Agent access, Add a
computer, Connect an app, Disconnect everything, Invite people.
- **Rollback safety, from the live commit `8a278cb` to `156a228`.**
- No PR in the range is labelled `one-way`, and every PR answers both
Release impact questions with "Yes".
- No migration, schema, API or CLI contract changes. URLs are unchanged.
- `rollback-rehearsal` passed on every landed head: none change a
migration or handler descriptor, so there was nothing to rehearse.
- A rollback leaves at most a 60-second receipt cookie, which release 18
ignores. Release 18 also ignores the `user` field the new Disconnect
everything form sends, and a CLI at `0.19.0` stays usable against it,
since the CLI changes only the "Your agents" wording.

## How it was verified

- **Tests.** Typecheck passes for core, api and the CLI, and so does
lint. Core, api, `WhatsNewPages` and the skill lock pass (149 tests),
including `whatsNew.test.ts` and `schemas.test.ts`.
- **The stack.** Before landing, `pnpm verify` passed on the stack
merged together: 2338 tests, plus browser, CLI and tier 2 smoke. Each PR
had a Sol code review and an acceptance verdict. All five landed with
the verified tree: `main`'s tree at `156a228` is identical to the
combined tree `pnpm verify` ran on.
- **Deploy state.** The live commit was pinned from `/healthz/deep`:
`8a278cb`, release 18. The Deploy run updated last succeeded, and none
is unfinished.

## Release impact

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required

This PR changes only the changelog text, one README line and the
`patchy` version. As with every release, a CLI installed before this
deploy is told to upgrade.

- **What does a revert leave behind?** Nothing. People whose seen marker
reached 19 would just see no new release.
- **Does the release before it still work with that?** Yes.

If this release misbehaves, roll back to
`8a278cb4eb93b2867594a7b19e28811e2cc1c231` (release 18).

Made by Claude Opus 5.5 in Claude Code, running in T3 Code.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@allisonmahmood allisonmahmood mentioned this pull request Oct 28, 2026
1 of 2 tasks
allisonmahmood added a commit that referenced this pull request Oct 29, 2026
## What changed

Patchy MCP has been live in production since release 17, but the product
doc, the glossary map and the MCP glossary still called it specified or
being built. They now describe what runs, and where the build settled a
detail differently from the spec, the spec now says what the code does.
Production acceptance (#861) hasn't run: the section says so, and claims
about particular clients are framed as what the build was designed for.

Part of #862. This is everything in #862's "What to do" except "What
remains takes acceptance's findings", which waits for #861.

## Look at

**Status and pointers.** Each of these now reads as built:
- `docs/product.md`: the "Built and live" intro line names Patchy MCP;
the Patchy MCP section opens "Built, and live since release 17", links
#833 and says #861 hasn't run.
- The same file's tier 2 sentence, `agent/` pointer, Companies (admins,
deactivation), Who's who and Bounds' admission rule.
- `GLOSSARY-MAP.md`: Auth and Patchy MCP.
- `packages/mcp/GLOSSARY.md`.
- `README.md`: the layout, plus one sentence on tier 2.
- `AGENTS.md`'s tier 2 line.
- `docs/OPERATIONS.md`: request events.

**Spec details the build settled differently.** Each claim was checked
against main:

| Claim in the doc | What main does | Where |
| --- | --- | --- |
| A forwarded host is trusted from Patchy's proxy | The door never
believes a forwarded host and refuses two `Host` fields |
`packages/mcp/src/RequestTrust.ts:7-10` |
| `Host` gates the OAuth endpoints too | Only `/mcp` is Host-gated; a
dev instance serves every route on `127.0.0.1` |
`packages/mcp/src/Door.ts:372`,
`packages/auth/src/OAuthEndpoints.ts:19-20` |
| An unknown method is `404` | `404` on 2026-07-28, `200` on legacy,
where 404 means session ended | `packages/mcp/src/Door.ts:356-363` |
| An `unknown_outcome` always resolves on retry | Only until a few
minutes before 24 h; then `key_expired` |
`packages/mcp/src/ChangeKeys.ts:116-123`, `Calls.ts:339-347` |
| An action's key never runs again | Unless Runtime refused the first
try before it started | `packages/mcp/src/ChangeKeys.ts:60-64`,
`Calls.ts:409-419` |
| `resource` is bound through exchange and refresh | Optional; must name
the door wherever sent | `packages/auth/src/Consents.ts:203-205,
345-348` |
| Consent re-asks after an account switch | Also re-asks an Allow after
the client's name changes |
`packages/auth/src/OAuthEndpoints.ts:423-436` |
| With agent access off, consent names the admins | To members; an admin
is told to turn it on | `packages/auth/src/OAuthEndpoints.ts:182-185` |
| "logged as Jordan via Claude" | The person's full name: "Jordan Lee
via Claude" | `packages/auth/src/OAuthEndpoints.ts:151-162` |
| The docs say how to reconnect by hand | Not written; Connect an app
gives first-time steps only | no such doc in `docs/`, `skills/`,
`packages/sdk/skills` |
| Publish's warning points at `<instance>/company` |
`<instance>/company/agent-access` |
`packages/patches/src/PatchesApi.ts:454` |
| The instance names a duplicated tool | It can't: inspection drops the
bundle's message; only the CLI names it |
`packages/execution/src/inspection.ts:12-16` |
| A read-only action's writes are type errors | Table and file writes
are; Pidgeon writes typecheck and the callback gate refuses them |
`packages/patchy/src/server.ts:247-262`,
`packages/runtime/src/CallbackGateway.ts:107-111` |
| `dev.log` names the person | It writes their id: `usr_dev via patchy
dev …` | `packages/patchy/src/devLog.ts:23-27` |
| New repos include `agent` | Tier 1 and 2 repos do |
`packages/patchy/src/initProject.ts:207` |
| The MCP request event says whether its binding is agent-only | Only
the binding event carries `agentOnly` |
`packages/analytics/src/WideEvents.ts:228` |
| An in-flight slot is held after the client disconnects | A client gone
before dispatch gives it back | `packages/mcp/src/Admission.ts:13-17` |
| The week-unused note opens "Not used since 2 Oct." | It opens "If you
reconnected …" | `packages/auth/src/MachinesPage.ts:178` |
| "today a person types everything into them" | Agents now find, read
and change patches too | the section itself |
| Pages "get phone checks when built" | They were checked at 390 px in
their PRs' screenshots (#871 #876 #882 #885 #931 #932) | — |

## How it was verified

- Four read-only passes went claim by claim through the Patchy MCP
section against main at 2f9f7c1. I re-read the code for every finding
before changing a line. The table lists each change.
- **Findings left as they are:**
- "the one secret Patchy keeps recoverable": the context is the
connection's tokens.
- "each change gets a fresh change key" in `patchy dev agent`: the
code's own comment says the same.
- The lists of which outside clients can connect: these are facts about
those clients, and the code offers no dynamic registration.
- `pnpm check`: format, lint, typecheck and synth passed. Two test files
failed under load average 19, a 5 s timeout in
`PgliteCompanyDatabases.test.ts` and a worker SIGKILL in
`devExecution.test.ts`. Both passed when rerun alone. Neither touches
docs.
- **Not done here:** `packages/sdk/skills/patchy-server/SKILL.md:415`
and `packages/sdk/src/sdkCapabilities.ts:107` say a patch's tools fit in
64 KiB, but the check allows 60 KiB of that answer. Those files belong
to another lane, so they're left for a follow-up.

## Release impact

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required

Docs only.

- **What does a revert leave behind?** Nothing; the docs go back to
calling Patchy MCP specified.
- **Does the release before it still work with that?** Yes.

Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code; reviewed and
accepted by GPT-6.1-Sol (xhigh).

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:docs Touches the docs area area:integrations Company connections and integration implementations area:server Touches the server area area:ui Portal and first-party browser pages, shared rendering and styles size:l 501-1,000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant