Repository navigation
feat(analytics): a restore event says whether the patch was retired or deleted - #690
Merged
Merged
Conversation
…r deleted patch.restored gains `from`, the state the locked row was in when the restore committed. A retired patch that was later deleted reports `deleted`. Closes #543 Co-Authored-By: Claude Opus 5.5 <[email protected]>
allisonmahmood
force-pushed
the
feat/543-restored-from
branch
from
October 15, 2026 19:56
f83b4d2 to
08ea705
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.
patch.restoredfires for both a retired and a deleted patch coming back, but doesn't say which. On the dashboard those are different moments: undeleting inside the recovery window is usually a mistake undone, bringing a retired patch back is a tool returning to use.patch.restorednow carriesfrom,retiredordeleted.Patches.restorealready locks the patch row and works out its state to refuse a live patch. It keeps that state once, narrowed toretired | deleted, and reports it. A patch that was retired and then deleted reportsdeleted, the state the portal and CLI showed for it. The catalogue type inAnalytics.tsmakes the field required, so every emitter has to supply it.Closes #543
Tests
The existing assertions already covered both cases on both paths. They now expect
from:PatchesApi.test.ts): retire → restore reportsretired; delete → restore reportsdeleted.PortalPages.test.ts): the card's restore reportsretiredanddeletedin its two cases. The reactivation bulk restore reportsretired.Patches.test.ts): the lifecycle sequence reportsretired.Tried by hand
Ran
pnpm dev up team. The worktree runner doesn't forward PostHog settings, so I ran a second server by hand on the same database, withPATCHY_POSTHOG_HOSTpointed at a local HTTP collector, as OPERATIONS describes. Then, as Ada:patch.restoredpatchy restore(environment CLI)from: "retired",byAdmin: falsefrom: "deleted",byAdmin: truefrom: "deleted",byAdmin: trueEach event carried the patch id, the owner, the company and Ada as principal. Torn down with
pnpm dev down.Surfaces
docs/OPERATIONS.mdlists event names and points to the catalogue for properties, so it is unchanged.Made by Claude Opus 5.5 in Claude Code, running in T3 Code.