Repository navigation
feat(teams): teams decide who opens patches and who builds with connections - #1417
Conversation
fcd37ce to
7906a65
Compare
324814f to
0c64824
Compare
2729e74 to
0f84e22
Compare
0c64824 to
39c4429
Compare
0f84e22 to
535d447
Compare
|
It's my code you could have at least stacked this on top of my shit lol. The ui is a lot nicer. I need to get much better at desigining haha. |
|
Reviewed #1417 at 535d447 against our previous Teams stack and Allison’s updated decisions. This reuses and develops our implementation rather than starting over. The sharing/access work and Change owner entry point remain; the Teams UI, role model and team visibility were deliberately revised. The targeted architecture and spec reviews found no blocking findings. You basically reused my code dawg. |
…ey shortcuts (#1421) ## What changed This adds release 42's What's new entry, written from `1cd6d12`. It covers everything merged since release 41's `through` (`a25a9c5`), and sets the `patchy` release to `0.42.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | New: Tell Patchy what it's missing | #1217, #1218, #1219, #1227, #1228 | | New: Turn off single-key shortcuts | #1276, #1279, #1301 | | Fixed: Typing reaches the patch again | #1407, #1412 | | Fixed: Dialogs in patches keep your place | #1420, #1255 | | Behind the scenes: plainer facts for agents building patches | #1249, #1256, #1297, #1418 | | Behind the scenes: Patchy stores teams and audiences ahead of teams | #1416 | | Patch changes: Mod+/ and `client.close()` in patchy/hotkeys; single-key shortcuts can be off; Tab wraps in plain modal dialogs | #1279, #1301, #1420 | #1376 is release 41's own entry. #1400, #1406, #1414, #1415, #1302, #1413 and #1419 are test, CI and dev tooling and need no line. The teams bridge (#1416) ships alone in this release so teams (#1417) can follow in the next one with a release to roll back to that reads its data closed. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `7f93b91` (release 41) to this PR's merge.** No PR in the range is labelled `one-way`, and every Release impact answer says release 41 still works: - **#1217** adds migration `0037_feedback`, a schema release 41 never reads. **#1227** and **#1228** write into it. - **#1276** adds migration `0038_single_key_shortcuts`, a column with a default that release 41 never selects. - **#1416** adds migrations `0039_company_teams` to `0041_connection_audiences`, which hold tables that stay empty until teams ship, and widens one scope check. Its CI rehearsal ran `7f93b91 → head → 7f93b91 → head` on one set of data, and all four steps passed. - **#1279**, **#1301**, **#1255** and **#1420** change the SDK and the shell. Patches built on this release carry a `shortcutSetting` manifest field that release 41 reads without refusing, and its shell names no frame, so every shortcut stays on. - **#1218** and **#1219** add CLI commands and an optional `feedbackHint` in `--json` failures. A CLI from this release refuses to publish to an older instance before sending anything, as any mismatched release does. - Everything else is skill text, docs, tests and CI. If this release misbehaves, roll back to `7f93b91` (release 41). Written by Claude Opus 5.5 in Claude Code, through T3 Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
Teams are flat sets of company people, managed by admins and visible to everyone. A patch is open to the company, to one or more teams, or to anyone with the link, plus its named guests; a connection is open to the company or to selected teams for building. Admins manage every company patch through the normal card without its content, and owners see who else changed their patch's audience or joined its teams as an admin. The CLI sets audiences with --share and --team and reports them in an additive `audience` field. Older CLIs keep their two-valued `scope`, and a scope-only request for a team patch is refused with `upgrade_required`. This replaces the previous release's fail-closed reading of team data with the real access rules, on the same migrations. Co-authored-by: Srikar Voleti <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Integrations' Last call read a connection's newest call from any patch, so an admin saw when a patch they can't open, or one since reclaimed, last used it. It now admits only calls from no patch or from patches the admin can open, the Calls tab's rule, before taking the newest. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r can build with
A member outside a connection's teams saw it counted on the catalogue
("2 connected") though Integrations itself left it out. The catalogue
now reads connections as the index does. Also corrects product.md's
deactivation paragraph, which still said every patch is company-wide.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Teams lists every team beside the open one, which shows what it reaches (the patches whose audience names it and the connections it builds with) and its people. Admins tick people in and out, review what the change does, then save it as one batch: - the review says what each person gains, loses and keeps through their other teams, and warns of live patches that stop building with a connection because their owner leaves the only team that reaches it; - the save is held to the member directory revision the review was drawn at, so a stale review is drawn again instead of undoing another change; - every state is an address and works without script: a search keeps ticks by posting only changes, and the review has its own address. Members read the same page. Deleting a team in use names each patch and connection with a link to where its audience changes. Core gains the list beside its entry and a sticky change bar, a checklist whose boxes say Adding or Removing against a saved state, and a search field that sits inside a page's own form. Teams' setMemberships takes adds and removes together with an optional revision, and the old directory cards go with the old page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d admin names render as text - A member's "Only admins change teams" sentence is escaped, and sits in the open team's header, which a phone keeps on screen. - A review reads the directory revision before its roster and reach, so a change landing while it is drawn makes its Save stale. - A guarded save locks its people and its actor before the directory row, the order a claims refresh takes them, so the two never deadlock. - The review counts each breaking patch once, listing every connection it loses. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
535d447 to
e458bb8
Compare
A member's content request now checks the patch's audience, with a query, after its lookup. The two tests that hold a second load until the first one's read waited only for the lookup, so a slow audience check let the first read finish first, and the second found it cached instead of joining it. They now wait for both audience checks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Acceptance: PASS with notesChecked Done means
Golden journeys
Rollback answers: match the diff with release 42’s bridge as the rollback floor. No migration or persisted-shape change was introduced by this delta. The fresh command Not run
Notes
Normal |
…onnections (#1422) ## What changed This adds release 43's What's new entry, written from `1cbd39f`. It covers everything merged since release 42's `through` (`1cd6d12`), and sets the `patchy` release to `0.43.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | New: Teams | #1417 | | New: Share a patch with just your team | #1417 | | New: Choose who builds with a connection | #1417 | | Improved: Admins look after every patch without opening it | #1417 | | Behind the scenes: earlier agents and CLIs keep working, and are asked to update before changing a team patch's audience | #1417 | | Patch changes: shared-source reads can be refused per viewer, and team-only connections follow the owner's teams | #1417 | #1421 is release 42's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `7028ec6` (release 42) to this PR's merge.** The only PR in the range is #1417, which isn't labelled `one-way`. - Its migrations shipped with release 42, the bridge (#1416), and the teams change adds none. - Release 42 reads team data closed: team patches are hidden and team-only connections unusable, with nothing widened and no 500s. - The four-step rehearsal `7028ec6 → #1417 → 7028ec6 → #1417` passed on #1417's head, run locally because CI's job skips when no migration changes. - Never roll back past release 42 once teams exist: earlier releases don't read the audience tables, so nothing keeps team patches closed there. If this release misbehaves, roll back to `7028ec6` (release 42). Written by Claude Opus 5.5 in Claude Code, through T3 Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
…#1540) ## What changed Home gave tools and pages the same weight: Yours and From colleagues interleaved both A–Z, so a run of pages published in one afternoon could bury the tools people come back to. Home now lists every live tool A–Z under **Tools**, with the recent pages in a narrow **Pages** list beside them (under them on a phone). New, Yours and From colleagues leave Home. Nothing is hidden by age: every page stays on All patches, in search and in the switcher. Closes #1538 ## Look at **Home for the admin in `dense`.** Tools A–Z with owner, failures and Share on her own rows; Pages shows each owner's newest page of the last 14 days, then All 4 pages (two of Brightline's four pages are older than 14 days). **1440px, after**  <details><summary>1440px, before</summary>  </details> **1024px, after.** Pages stays beside Tools. From 1024px to 1279px, while Pages sits beside Tools, the Failures column gives way, a failing tool's count moves under its title, and Share shrinks to its icon.  <details><summary>1024px, before</summary>  </details> **390px.** Pages follows Tools; Share is in the row's menu. | Before | After | | --- | --- | |  |  | **A company with only pages** (Dana at Harbor & Pine Coffee, who has no agent yet, so the Final step sheet is up): Pages takes the main column whatever the pages' age, then All N pages. | Before | After | | --- | --- | |  |  | **Core** gains three small parts, each with a `/~ui` gallery entry and its state table: - `mainWithRail`: a main column with a narrow rail beside it, following it below 1024px. It's a new `main-rail` style chunk; pages add no CSS. - a `row`'s `descriptionLink` ("+5 more"), which sits above the row's stretched link so it stays pressable at every width. - a table column's `hideBelowWide`, with `hide-below-wide` / `show-below-wide` beside `hide-sm` / `show-sm`. **Where this goes beyond the issue's text, and why** - **All N pages** must match what All patches' Pages lists, and that list includes pages an admin manages but can't open. Home now makes the same `read` with `managed: true` and filters it to the patches the viewer can open for everything it shows. It's still one query; only the count uses the wider set. - **Share turns into an icon below 1280px**, as in the picked 1024px look, and moves into the menu on a phone (Yours did this before #1417). - **The Failures column gives way from 1024px to 1279px, only while Pages sits beside Tools,** and on a phone as before. Where Tools has the full width it stays, and a failing tool's count shows under its title wherever the column is hidden. ## How it was verified The issue's Done means, each covered by `HomePages.test.ts`: - In a company with tools and pages, Tools lists every tool A–Z with owner, calls on the rows the viewer manages and Share on their own rows; Pages sits beside it in the rail; New, Yours and From colleagues are gone. The `dense` shots above show the same. - A colleague's tool the viewer never opened carries the dot, and opening it clears it. - An owner with six pages published today takes one row ending "+5 more", whose link lists all seven of their pages, including one from 15 days ago. - A page from 15 days ago isn't under Pages but is on All patches' Pages. Republishing it brings it back. - "All 8 pages" links to a listing of 8 rows. - A company with no live tool shows its first twelve pages, newest first, however old. - Tools comes before Pages in the DOM, so a phone shows Pages after Tools. `pnpm check` passed: 349 test files, 3931 tests. `pnpm verify`: the first run failed only the two browser jobs, on the `/~ui` keyboard spec, because the gallery demo added a second "Actions for Kudos" button. I renamed the demo row; that spec passes on Chromium (12 of 12). The full rerun at this head passed format, lint, typecheck, synth, postgres-concurrency, cli-smoke, install, tier2-smoke, browser and browser-firefox. `test` and `test (bun)` timed out in 25 files across execution, integrations, the CLI and the server while the machine was under load (the same suite passed in `pnpm check` an hour earlier). All 25 pass when run alone. None of them is in portal or core. I didn't check by hand in Firefox or Safari. The layout is the existing grid and the media queries `.split` and the tables already use. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required It changes only what Home reads and draws. There is no wire contract, CLI, migration or skill change, and no stored data. It ships alone and is not one-way. - **What does a revert leave behind?** Nothing; Home goes back to New, Yours and From colleagues. - **Does the release before it still work with that?** Yes. Made by Claude Opus 5.5 via T3 Code --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
A company can now make teams, open a patch to chosen teams instead of the whole company, and limit who builds with a connection. Roles stay member and admin.
--share company|public|teams --team <name>onpublishandshare, pluspatchy audiences.Closes #1285, #1286, #1287, #1288, #1289, #1290, #1291, #1365, #1367, #1368, #1403, #1408, #1410. Supersedes #1284 and #1361: there is no super admin, and team rules follow #1192's decisions. #1416, the rollback bridge, shipped first, in release 42.
Look at
The Teams page. Mock B was picked from three directions. The team list sits beside the open team. Its access card shows what the team can open and build with. The roster is the editor, and a sticky bar counts the changes.
Review before saving. It says what added people will reach and what removed people lose or keep, and warns about live patches that will stop working.
Delete refused while in use, the member view, the phone screens, and the old page
Before (the previous Teams page):
Also worth a look:
scopeand addsaudience. A test decodes the list, publish, publish-replay and share responses with the released CLI's schema.How it was verified
Tests. Every behaviour fix has a focused test that fails without it. In an earlier end-to-end run, 21 of 22 deliberate breaks of the access checks were caught; the 22nd now has a test.
pnpm verifypassed on the final code. The new audience check made two serving cache tests racy in the Bun lane; they now wait past it, and a forced slow check fails the old tests and passes the new ones.Rollback. The full four-step rollback rehearsal, with release 42 (the bridge) as the live release, passed on this head: bridge, then this, then the bridge, then this. CI's own rehearsal job passes at once here, because the migrations live in the bridge (feat(teams): store teams, and keep team data closed until teams ship #1416), where CI rehearsed all four steps. In a hand-run rollback onto the bridge with real team data, team patches went hidden and team-only connections unusable, with no 500s, and rolling forward restored both.
Acceptance (GPT 6.1 Sol, on throwaway instances): PASS with notes on this head. The first run failed on three Teams page defects, all since fixed and re-checked with its own reproductions:
It also checked every role, every surface an outsider must be refused on, live revocation, admin oversight, stuck owners, connections, shared tables, and the released CLI against this server.
Reviews. Four GPT 6.1 Sol review passes; all findings are fixed.
Release impact
Roles,
/api/me, and existing patches and connections are unchanged: patches stay Company, connections stay company-wide. Installed CLIs seecompanyorpublicfor every patch, and get an upgrade message only when changing a team patch's sharing with a scope alone.Taken over from Srikar's teams work (#1404, co-authored). Built by Claude Opus 5.5 in Claude Code, reviewed by GPT 6.1 Sol.