Skip to content

feat(organization): let staff offer Harper versions to one organization - #2137

Draft
Devin-Holland wants to merge 7 commits into
stagefrom
feat/org-harper-versions-867
Draft

Devin-Holland wants to merge 7 commits into
stagefrom
feat/org-harper-versions-867

Conversation

@Devin-Holland

@Devin-Holland Devin-Holland commented Nov 20, 2026 •

Copy link
Copy Markdown
Member
The hero pins a new hourglass key card onto one guild column of a dungeon ledger while his tiaraed cat poses for a drone

⊙ 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

🤔 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

Cases covered
  • Lists entries and marks an expired one. Shows an unreadable expiry as such.
  • Offers a version with its expiry, sending the whole list built from the stored one, and keeps another editor's unpolled change.
  • Edits in place. An untouched expiry is sent back as stored. An unreadable one opens as today and can be cleared to none.
  • Removes a version. A failed read saves nothing.
  • Refuses an already-offered version, an entry removed since the form opened, the stable label, a non-semver version and an impossible day.
  • Disables removing and editing other entries while a form is open.
  • Shows the section only to staff with org:update and org: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

Devin-Holland and others added 7 commits November 20, 2026 12:29
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>
@github-actions

Copy link
Copy Markdown

hdbms preview: https://feat-org-harper-versions-867.app.dev.studio.harperfabric.com/

Commit aa9b91f, workflow run. It updates on each push and is removed when this PR closes.

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 86.44% 24332 / 28148
🔵 Statements 86.23% 25868 / 29998
🔵 Functions 82.6% 6801 / 8233
🔵 Branches 82.05% 21611 / 26338
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/features/organization/settings/HarperVersionsSetting.tsx 96.9% 96.51% 94.11% 97.7% 136, 181, 254
src/features/organization/settings/index.tsx 73.68% 68.62% 64.7% 75.67% 92-93, 133, 134, 146-150, 157-158, 163-164, 169-172, 222, 286-392, 427-428, 502-503
Generated in workflow #2632 for commit aa9b91f by the Vitest Coverage Report Action

This branch was successfully deployed

2 active deployments
hdbms-preview — aa9b91fe Deployed Nov 20, 2026 by github-actions[bot]
preview — aa9b91fe Deployed Nov 20, 2026 by Devin-Holland via deploy #38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants