Repository navigation
feat(companies): a look restore says who restored it and why - #688
Merged
Merged
Conversation
Owner
Author
|
Cross-family review: GPT 6.1 Sol (xhigh, read-only, one pass) reviewed |
A company keeps one record of its latest look restore: who moved the pointer, when and an optional note. A restore that moves the pointer sets it, restoring what is already current changes nothing, and a publish clears it. The look read and restore return it as `restored`, generation writes it into index.json as `lookRestore`, and the change notice, `patchy look` and the patchy-look skill name the restorer instead of crediting the revision's publisher. `patchy look restore` takes --note. Co-Authored-By: Claude Opus 5.5 <[email protected]>
allisonmahmood
force-pushed
the
feat/587-look-restore-record
branch
from
October 15, 2026 19:35
1e84653 to
4796712
Compare
allisonmahmood
added a commit
that referenced
this pull request
Oct 16, 2026
…u when they fail (#720) Release 13's What's new entry, written from `c9b8fc4`, ahead of deploying it. `patchy` and `CURRENT_RELEASE` move to `0.13.0`, so CLIs and patch repos installed before this deploy are told to upgrade. | Change | PRs | | --- | --- | | New: Home puts the patches you use first | #713, #716, #719 | | New: Every patch in one list | #715 | | Improved: Each patch's page leads with Open | #717 | | New: See when your tools are failing | #718 | | Fixed: Everyone has a name | #687 | | Improved: Your company's look is easier to get right | #697, #696, #703, #688 | | Improved: Forms follow your look's error states | #691, #692 | | Improved: Clearer answers when a publish goes wrong | #686, #685, #689 | | Fixed: Your agent's Patchy commands are steadier | #695, #704, #680, #681 | | Behind the scenes: stricter checks on static pages and tools' database requests; malformed requests are logged | #682, #693, #683 | | Behind the scenes: usage numbers count every publish, sharing change and restore | #698, #699, #700, #690 | | Test and tooling only, no line | #705, #702, #701, #694, #684, #607 | Made by Claude Opus 5.5 in Claude Code, running in T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restoring a look moved the company's pointer but recorded nobody. A repo at revision 8 that refreshed after Ada restored 7 heard "rev 8 → 7 by Sam: first green", crediting Sam with Ada's decision, and
patchy lookshowed nothing about the restore.What changed
A company now keeps one record of its latest look restore: who moved the pointer, when, and an optional note. It is a single record, not a history. A later restore replaces it and a publish clears it.
companies, added by migration0016_look_restore.Looks.restoresets them in the same transaction that moves the pointer. Restoring the revision that is already current changes nothing, the record included.Looks.publishclears them.Looks.readreturns the record from the same statement as the revisions.LookRestoreRequest.noteis optional and validated as aLookNote.CompanyLook.restoredandLookRestored.restoredare{ by: { id, name }, at, note } | null. The decoders also accept the key being absent, so a new CLI still works against an older server.index.jsongetslookRestorebesidelook, from the same read. Thepatchy-lookskill's state line names the restorer. Notices still compare looks by revision and creation time, so a restore that leaves a repo on the revision it already has stays silent.Acme's look changed, rev 8 → 7, restored by Ada: rev 8 failed dark mode.Without a note it reads…, restored by Ada.Fornone, the notice names the restorer, then says the Patchy look stands in.patchy look restoretakes--note.patchy lookandlook restoreprintRestored by Ada on 2026-10-07: …under the byline, and--jsoncarriesrestored. Notices for publishes are unchanged.Migration id: 0016. #583's fix (#687) also adds a Companies migration and took 0015, so this one was renumbered when the two were merged together.
Surfaces
packages/apischemas and endpoint descriptions, thelookhandler,look/look restoreand their--jsonshapes, anddocs/API.md(regenerated).packages/patchy/README.md, ADR-0004, the globalpatchyskill (--note) with itsskills-lock.jsonhash, and thepatchy-loopproject skill's notice example. Thepatchy-lookstate line comes from generation.docs/product.md.0016_look_restoreinpackages/companies/src/migrations.ts.look.restoredanalytics are unchanged.Tested by hand
pnpm dev up team(Acme Co). Ada (admin) published two revisions with the environment's CLI and created a patch repo at revision 2. Ada promoted Cleo to admin on/company. Cleo's and Ben's own CLIs then logged in through the device flow, each approved with that person's own cookie jar.The repo's
patchy-lookskill then read: "This is the company's look, revision 1, published by Ada Park: first green. Cleo Shah restored it on 2026-10-14: rev 2 failed dark mode."The remaining acceptance cases, in the same instance:
look restore none --note minewas refused (Only an admin can change Acme Co's look. Ask Ada Park or Cleo Shah., exit 2), and the record stayed Cleo's.look restore 1while 1 was already current left Cleo's record untouched.look restore nonewithout a note printedRestored by Cleo Shah on 2026-10-14.The repo's next refresh readrev 1 → none, restored by Cleo Shah. The Patchy look stands in.patchy lookshowed no restore line andrestored: null. The repo at revision 1 heardrev 1 → 3 by Ada Park: third green.withlookRestore: null.main'sLookRestoredandindex.jsonschemas decode bodies carryingrestored/lookRestore, and ignore the new keys.The look, migration and generation suites pass locally. A full
pnpm verifyis still queued behind the shared machine's lock, so CI is the gate here.Closes #587
Made by Claude Opus 5.5 in Claude Code, running in T3 Code.