Repository navigation
feat(organization): let staff offer Harper versions to one organization - #2137
Draft
Devin-Holland wants to merge 7 commits into
Draft
Devin-Holland wants to merge 7 commits into
Devin-Holland wants to merge 7 commits into
Conversation
A "Harper versions" section on the organization settings page, shown only to staff holding org:update, lists the versions central manager offers this organization beyond the public list (Organization.harperVersions, central-manager#867): an early-access build, or an older build it stays on. Staff offer a version with an expiry (prefilled 90 days ahead, empty for none), change one, or remove one; each save sends the whole list to PATCH /Admin/Organization/:id. An entry past its expiry, or whose expiry does not parse, is marked expired, as central manager reads it. Refs HarperFast/central-manager#867 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and edit Review round fixes. Offering a version already on the list is refused instead of overwriting the stored entry, and saving an entry someone removed since the form opened is refused instead of re-adding it. An expiry the form did not change is sent back as stored, so a timed or unreadable expiry is not rewritten to midnight or to none. The section needs org:read as well as org:update, since only org:read returns the list a save replaces, and it remounts per organization so a draft never carries over. An unreadable expiry reads as such, and the expiry field takes only a date. Refs HarperFast/central-manager#867 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, and refuse impossible days An unreadable stored expiry opens as today, already expired as central manager reads it, so keeping it stays expired and clearing it saves no expiry in one edit. The expiry check refuses a day that would roll over, such as 2026-02-31. Refs HarperFast/central-manager#867 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p an open form open Closing review round fixes. Each save reads the organization's stored list just before it builds the replacement, rather than the last poll's copy, so it does not put back what another staff member just changed, and the removed-since-opened check sees removals the page has not polled yet; a read that fails saves nothing. Removing or editing other entries waits while a form is open, so a removal no longer closes it with unsaved input, and every action waits for the save in flight. An unreadable stored expiry is explained under the date field. Refs HarperFast/central-manager#867 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… own before saving A save reads the organization with its own request rather than through the query cache, which could hand back a poll started before another editor's save, and which toasted a failed read a second time. Cancel waits for a save in flight, and removing an entry someone else already removed sends nothing. Refs HarperFast/central-manager#867 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nge in place Central manager now caps what a staff edit stores, as it does metadata: a list the one-time move left over 25 can shrink or change but not grow. The editor applies the same rule instead of refusing any save of such a list. Refs HarperFast/central-manager#867 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ave from an unreturned list A save central manager refuses shows its reason on the form (a removal's, as a toast), instead of only in the global toast. A save refuses to run when the read did not return the list, which central manager returns, as [] when empty, only to staff holding org:read; building on a missing list would wipe the stored one. A name-only save keeps an unreadable expiry as stored. Refs HarperFast/central-manager#867 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Commit |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
dawsontoth
approved these changes
Nov 20, 2026
This branch was successfully deployed
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.
⊙ Problem
Central manager now keeps the Harper versions offered to one organization on that organization (HarperFast/central-manager#867, in HarperFast/central-manager#1285). Staff need a place to manage them without calling the admin API.
💡 Solution
org:updateandorg:read, lists each version with its name and expiry and marks expired ones. The entry type matches central manager's.PATCH /Admin/Organization/:id. Conflicts and central manager's refusal of a save show on the form, a removal's as a toast, and an untouched expiry is sent back as stored.🤔 Should this live on the customer's settings page?
It is staff-only, gated on staff permissions, but it sits on a page members also use. The alternative is a page under
/admin, which #2094 plans for organizations; moving it there later is a small change.✅ Verification
pnpm test(run by the commit hook): 758 of 758 files pass.oxlint,dprint checkandtsc --noEmitare clean.HarperVersionsSetting.test.tsxandindex.test.tsxcover the cases below.Cases covered
stablelabel, a non-semver version and an impossible day.org:updateandorg:read.🤖 Generated by Claude Code (Claude Opus 5.5); posted via @Devin-Holland.
Related PRs: none found
Complexity: medium
Review-Coverage: authored=claude; ran=cursor-composer,gemini,codex,cursor-grok; late=cursor-grok:adjudicated; adjudicated=domain; declined=muse; rounds=7; full=2 @ aa9b91f
Review-Attention: read ~6m (decisions: read-then-replace, form-root-error-over-toast, missing-list-refuses-save) @ aa9b91f