Skip to content

feat(portal): the card splits into Overview, Log, Versions and Settings - #717

Merged
allisonmahmood merged 2 commits into
mainfrom
portal/711-card-tabs
Oct 16, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
portal/711-card-tabs

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

Stacked on #716. It can ship once #713, #715 and #716 are in.

With the index gone (#716), the card at /patches/<name> was still today's single long page: facts, a Manage section with the description and sharing forms, a four-row versions table, and Retire and Delete at the bottom. Open was one button among many, and tier 3's triggers block (#640) would have crowded it further.

Fix

  • Header. Breadcrumb Home / All patches / name, the patch's mark, name, title line and tags (Tool or Page, Company only or Public, vN, Retired or Deleted). Then the one act that matters most: Open on a live patch, or the existing Restore control for a manager while an off patch can be restored. The copyable address sits under it.

  • Tabs. Everyone gets Overview and Versions. The owner and admins also get Log and Settings.

    • Overview: the description and editor, the facts (now with visits), an off patch's note and restore hint, the admin's deactivated-owner warning, and recent activity.
    • Versions (/versions): every version, with rollback for managers. It replaces the card's four-row table.
    • Log (/log): the existing log, inside the frame.
    • Settings (/settings, new): the old Manage section. Owner with admin-only Reassign…, the description and who-can-open forms, then Stop serving (Retire…, Delete…) or, for a retired patch, Delete….
  • Forms keep their routes, fields and checks. A success redirects to the tab the form sits on: description and scope to Settings, rollback to Versions, the confirmation acts to Overview. Refusals:

    • a member's POST, or a missing or mismatched expectedPatchId (including a name that now names another patch), renders Overview with the notice and never another patch's forms;
    • a permitted description, scope or rollback refused as stale, invalid or wrong-state renders that form's tab, keeping the submitted description;
    • confirmation acts behave as before.

    A member's GET of Settings renders Overview with a 403 notice, as the log already did.

  • The Settings items in All patches' menus and on Home's tiles now link to /settings.

  • ?all=1 is gone. It only toggled the index's retired rows. Links no longer carry it, and requests that do are answered as if they didn't.

Verified

  • PortalPages.test.ts:
    • the card tests now check each role's tabs, a member's 403 on Settings, the forms on Settings and Versions (every non-current version is offered for rollback), and Restore leading an off card;
    • redirects land on Settings or Versions;
    • the stale, invalid and name-moved refusal tests read their forms from the right tab and still answer the same status and notice;
    • 88 portal tests pass.
  • In the browser, pnpm dev up brightline as Allison: Overview, Settings and Log for new-business render with no console errors.
  • pnpm check: format, lint, typecheck and synth pass. cliRepoBuild.test.ts timed out once under load and passes in CI on feat(portal): All patches lists every patch, with tabs and search #715 and feat(portal): Home replaces the index #716 and alone.

Release impact

  • Breaking
  • Not breaking: every route and form field is unchanged, plus one new GET route (/settings). Old ?all=1 links still answer.

Surfaces

  • Served pages. The card composes shell components (tabs, tag, the mark, note, fields). Page CSS is layout only.
  • Vocabulary. Portal glossary: Card (its tabs), Log (a tab), Settings replaces Manage. GLOSSARY-MAP.md's Portal line. docs/product.md's card sentences.
  • Reverse states. Restore leads every restorable off card, and Retire, Delete and Reassign keep their confirmation pages.
  • Wire contract, CLI, migrations and repo layout: not touched. Off-address notices still link to the card and its restore route.

Part of #707. Closes #711.

Made by Claude Opus 5.5 in Claude Code, running in T3 Code.

@github-actions github-actions Bot added area:docs Touches the docs area area:ui Portal and first-party browser pages, shared rendering and styles size:l 501-1,000 changed lines labels Oct 15, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review: GPT 6.1 Sol, xhigh, round 1. Two findings, both fixed in the commit after 0ada446.

  1. An identity refusal showed another patch's Restore form. When an old form's name now named a retired patch the viewer manages, the 409 Overview carried that patch's header Restore. Identity refusals now render read-only. The name-moved tests assert that the response has no /patches/… form at all.
  2. Refused descriptions lost the draft. Stale and wrong-state refusals now keep the submitted text in the field. When the patch was deleted and can't take a description, the draft is shown, escaped, under "Your description, not saved" so it can be copied. Tested: a stale refusal keeps "Overwritten" in the textarea, and a deleted patch shows the draft.

92 portal tests pass; lint passes.

Base automatically changed from portal/710-home to main October 16, 2026 01:16
allisonmahmood and others added 2 commits October 16, 2026 03:16
The card at /patches/<name> leads with Open, or Restore for a manager on
an off patch, then tabs: Overview for everyone, Versions with rollback,
and Log and Settings for the owner and admins. Settings holds what the
card's Manage section did. A form's success and its refusals land on the
tab the form sits on; refusals of who may act stay on Overview. The
?all=1 flag, a leftover of the index, is gone.

Part of #707. Closes #711.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…keeps its draft

A form posted for a name that now belongs to another patch rendered
that patch's Overview, header Restore form included; it is now
read-only. A description refused as stale or because the patch was
deleted kept the notice but lost the draft; the draft now fills the
field, or shows to copy when a deleted patch can't take it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood merged commit adb9aa1 into main Oct 16, 2026
13 checks passed
@allisonmahmood
allisonmahmood deleted the portal/711-card-tabs branch October 16, 2026 01:27
allisonmahmood added a commit that referenced this pull request Oct 16, 2026
Stacked on #717. It can ship once #713, #715, #716 and #717 are in; the
rest of the stack is complete without it.

When an owner's tier 2 tool starts failing, they don't find out unless
they open its log. An admin tidying the company can't see which tools
are broken either.

## Fix

- **`InvocationLog.failures({ companyId, since })`.** Per patch, the
number of top-level entries started since `since` whose effective
outcome is one the log's **Failed** filter shows. It reuses the filter's
own outcome expression, now named `failed`: commit proof reads as
success, an overdue pending entry reads as unknown, and unknown isn't a
failure. One grouped query over a new partial index,
`runtime_invocations_top_level_recent (company_id, started_at) WHERE
parent_id IS NULL` (migration `0018`, after #713's `0017`).
- **Who sees it.** Only the tier 2 patches the viewer manages (the
owner, or any patch for admins). A member who manages none never queries
the log.
- **All patches.** A **Health** column (`OK`, or `N failed` linking to
the log filtered to Failed), and the Needs attention reason "N calls
failed in the last day" with a See the log button. A deletion near
reclamation and a deactivated owner still come first.
- **Home.** An owner's own failing tools are named at the top, each with
its count and a link to its failed entries. Admins see everyone's in All
patches, not on Home.
- `patchy dev`'s stub `InvocationLog` answers `failures` with nothing,
like its other reads.

## Verified

- `InvocationLog.test.ts`: two failed top-level entries of the last day
count. An entry 25 hours old, an overdue pending one, a nested failure
and a success don't. The Failed filter lists the same entries plus the
older one.
- `PortalPages.test.ts`, "patch health": three failures today and one
two days ago show as 3 in the owner's Home warning, linked to
`log?outcome=failed`, and not on a member's or an admin's Home. Owner
and admin see Health (`3 failed`, `OK`) and the Needs attention reason.
A member sees no Health column, no counts and no Needs attention tab.
- `pnpm check`: format, lint, typecheck and synth pass.
`cliRepoBuild.test.ts` timed out under local load, as on the PRs below,
where CI passes it.

## Release impact

- [ ] **Breaking**
- [x] **Not breaking**: one read added to the log service and to the
portal's pages, plus one additive index; no wire or CLI change.

## Surfaces

- **Migrations.** `0018_invocations_top_level_recent` in Runtime's
migrations. It takes the next id after #713's `0017`; if another
migration lands first, renumber it.
- **Vocabulary.** Portal glossary: **All patches** (Health) and **Home**
(the owner's warning). `docs/product.md`'s portal paragraph.
- **Served pages.** Composes `note`, `pill` and `list`; no new
component.
- Wire contract, CLI, migrations, dev loop and repo layout: not touched.

Part of #707. Closes #712.

Made by Claude Opus 5.5 in Claude Code, running in T3 Code.

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Touches the docs area area:ui Portal and first-party browser pages, shared rendering and styles size:l 501-1,000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(portal): the card splits into Overview, Log, Versions and Settings

1 participant