Skip to content

feat(ui): sidebar by scope, account menu, calmer components - #930

Merged
allisonmahmood merged 5 commits into
mainfrom
feat/dashboard-sidebar
Oct 25, 2026
Merged

allisonmahmood merged 5 commits into
mainfrom
feat/dashboard-sidebar

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

What changed

The dashboard's top bar put patches, the company page, company data and your own devices side by side at the same weight. Home had no nav item, and Sign out took a top-level slot. Signed-in pages now share a sidebar grouped by whose thing each place is:

  • Home, All patches, Your agents
  • Company: People, Integrations, Agent access
  • At the foot: What's new and an account menu (name, email, Sign out)

Below 900px the same markup opens from a Menu button as a popover. There's still one nav and no script.

This PR also adds two shared pieces that the follow-up PRs build on:

  • Receipts. A form can leave a one-line receipt ("Revoked Studio Mac mini") that the next page shows once.
  • A calmer component set. Rows, tiles, tabs, side panels and step cards lose their hard shadows, and a lit tab or place is a pale yellow fill.

Every URL is unchanged. This PR changes nav labels only; page headings and copy change in the follow-ups.

Look at

The sidebar. The page body below is still today's company page; its rework is a follow-up.

Before After

The account menu, and the phone Menu.

Receipts (packages/auth/src/Receipt.ts):

  • The POST that made the change sets a 60-second HttpOnly cookie bound to the person, named __Host-patchy_receipt over HTTPS.
  • RequireSession.withViewer takes it on their next page and clears it. The shell renders it escaped, at the top of <main>.
  • A receipt left for someone else, such as before an account switch, or one that can't be decoded, is cleared without being shown. No URL can make a page claim a change.

How it was verified

  • vitest for core, auth, integrations, serving, portal, companies and server: 75 files, 744 tests. That includes new shell tests (places, a single nav, the lit place, the receipt's escaping) and receipt tests (bound to the person, cleared, forged values ignored, length capped).
  • Typecheck, lint and format pass.
  • Checked on a local Brightline instance at 1280px and 390px: the sidebar, the phone Menu popover, the account menu and the What's new panel.
  • Not yet run: pnpm verify across the whole repo. It runs once the stack is complete.

Release impact

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

Only the shell's markup and CSS change, and every route and the CLI are untouched.

  • What does a revert leave behind? At most a receipt cookie, which expires within 60 seconds and which the old release ignores.
  • Does the release before it still work with that? Yes.

Made by Claude Opus 5.5 in Claude Code (T3 Code), with research and plan review by GPT 6.1 Sol.

allisonmahmood and others added 2 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]>
@github-actions github-actions Bot added area:server Touches the server area area:core Touches the core area 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
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]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review: GPT 6.1 Sol (xhigh). Four should-fix findings and no blockers, all fixed in ee672e3:

  1. The phone header grew into spare height on short pages (382px at 390×844). The phone grid now uses grid-template-rows: max-content minmax(0, 1fr), and the header measures 65px.
  2. At 320px the Menu sheet filled the screen, leaving nowhere to tap to close it. The sheet is now min(320px, 100vw - 48px), so the strip beside it closes the menu. Checked in Chromium: an outside tap closes it.
  3. Receipts were cleared by responses that never showed them, such as redirects and /guide/steps. pageResponse now marks a page that rendered the viewer's receipt, and withViewer clears the receipt only then. A receipt left for someone else is still dropped at once. A new socket test covers it: the receipt survives a 303, the next page shows it escaped and clears it, and another person's receipt is dropped and never shown.
  4. A Menu opened on a phone and left open while the window widened jumped to the corner. At ≥900px an open menu now sits where the sidebar's menu does, under the brand. Checked by opening at 320px and widening to 1280px.

Re-ran core, auth, portal, integrations and serving: 57 files, 624 tests pass.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked 8051b91b276d428e1a942816a2f5797290c5a435 (base 8a278cb4eb93b2867594a7b19e28811e2cc1c231) on brightline, by GPT-6.1 Sol in the Codex harness, T3 Code. I did not write this change.

Done means

  • Sidebar and account menu: passed. Admin and member responses each contain one Primary nav and all six places; Home, All patches, Your agents, People and Integrations mark the expected place. Cards and portal 404s keep the shell. Agent access follows the expected 303 to the existing company-page switch on this head. The old page headings/bodies are expected here.
  • Responsive navigation: passed at 1280, 390 and 320px. At 390px the header measured 65.5px. The 320px Menu was 272px wide with a 48px dismissal gutter; an outside click dismissed it and its nested account menu. Widening an open Menu placed it at x=0, y=64 under the brand. Account name/email/Sign out remained accessible. What's new opened and cleared its dot.
  • Receipt lifecycle and escaping: passed in Receipt and real-socket tests: HTTPS host-cookie attributes, 60-second lifetime, person binding, malformed-value rejection, 300-character cap, preservation through redirects/non-app pages, escaped rendering, clearing after display, and no internal marker header on the wire.
  • Calmer shared components: passed in shell rendering tests and live desktop/phone inspection.

Targeted run at the checked head:

Test Files  8 passed (8)
     Tests  151 passed (151)

This covered core HTML, Receipt, AuthPages socket, MachinesPage, CompanyPage, PortalPages, portal render and ConnectionPages.

Golden journeys

  • Sign in/out: passed. Signed-out /company answers 401, private/no-store, the sign-in header and no Location. Persona sign-in returns to the page; account-menu sign-out restores the door.
  • Log a machine in: passed. The isolated environment CLI printed its URL/code; Jordan confirmed a named computer, whoami named him and that computer, and it appeared on /machines. Revoke made whoami reject the credential; logout completed.
  • Publish a page: passed. Published a throwaway HTML page; both admin and member could open its address. Retire/restore and delete/restore returned the expected states and the restored address served its content.
  • Share/unshare: passed. Harbor & Pine's current page answered 200 without a session when public, then 401 after returning to company scope.
  • Find/open a tool: passed. Home search found one Kudos match and opened its sandboxed frame.
  • Tier 1 live use: passed. Jordan's new kudos appeared on Priya's already-open wall without a reload (14 → 15).
  • Tier 2 use: passed. New Business loaded its sample deals. Jordan moved Verdant Grocers Lead → Discovery; Allison saw it without reloading. Moving it back also propagated. Spend refused Jordan approving his own waiting request.
  • Invite/join and reverse states: passed. A throwaway invitation joined Brightline and reached Home. A separate pending invite was revoked. Deactivation showed the person's refusal door; reactivation restored access.

Rollback answers: match the diff. No schema, durable data format, infrastructure or API/CLI contract change; the prior release ignores the short-lived receipt cookie. No one-way label needed. All reported head CI checks are green, including browser, clerk-live, CLI, tier2-smoke and rollback-rehearsal.

Not run

  • Local pnpm verify and live Clerk/mail suites: intentionally omitted on the shared machine as requested; the head's CI results cover those suites. The direct run used dev personas and sent no real mail.

Notes

  • No functional failure found. pnpm dev down completed and removed this run's instance/environment. No code, PR branches, bodies or labels changed.

@allisonmahmood
allisonmahmood merged commit 9a47199 into main Oct 25, 2026
14 checks passed
@allisonmahmood
allisonmahmood deleted the feat/dashboard-sidebar branch October 25, 2026 14:55
allisonmahmood added a commit that referenced this pull request Oct 25, 2026
…ages (#931)

## 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:


![](https://github.com/user-attachments/assets/c6af91cd-673d-44b8-ad0e-f3966c83bcff)

![](https://github.com/user-attachments/assets/41b8c896-12bd-4df1-a92f-d3fe27bccf73)

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


![](https://github.com/user-attachments/assets/dec10851-2da7-4a03-a8f7-fc69bfddecd7)

![](https://github.com/user-attachments/assets/1765cd60-a3c5-4570-a43d-198a99a1fe80)

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


![](https://github.com/user-attachments/assets/d13ca6e2-9c18-4748-84f0-df8dc6a7017b)

People at 390px with the invite open:


![](https://github.com/user-attachments/assets/369e7407-a998-42ba-988e-cddea90ee511)

## 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
- [x] **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](https://github.com/user-attachments/assets/d6a3ae37-8e0e-49f0-9afd-db066685174e)

---------

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

Labels

area:core Touches the core area 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