Skip to content

prototype(portal): the deployed-stage portal, made real (#241) - #246

Closed
allisonmahmood wants to merge 6 commits into
mainfrom
prototype/portal
Closed

allisonmahmood wants to merge 6 commits into
mainfrom
prototype/portal

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Prototype, not for merge. Part of #241 on the Portal map (#230).

The list mocks (#239) and the patch-page mocks (#240) picked a design: a master-detail portal at / with the patch's card at /patches/<name>, edits inline and destruction on confirmation pages. Nothing had run it on the real server, session, rows and CLI. This branch does, so the ticket can answer "does the design hold when it is real" before the spec (#242) is written.

What is here:

  • The portal at / and /patches/<name>: index grouped Yours / Company / Retired and deleted, the card with its facts, Manage for the owner or an admin, plain POST forms.
  • One app shell for every signed-in page: the portal, Company, Connections and Your machines share the header, nav and card width (Allison's first-pass feedback; the sign-in and device-login doors keep the card).
  • Inline: description, who can open it, rollback ("Show this version at the address"), restore when the patch's own sources are intact. Off the card: /retire, /delete (typed name), /restore (only when sources are broken), /reassign (admins), /versions.
  • Stale actions: every form carries the row's revision; a changed patch answers 409 with a notice and nothing done.
  • patchy list, list <patch> and list <patch> <primitive> over the same rows, --json, --mine, --state.
  • A throwaway migration (0008_prototype_portal) for retired_at, deleted_by, the description columns and reassignment stamps; retired patches leave serving; names stay reserved on delete.
  • A seed that fills the dev company with colleagues and a dozen patches in every state, two of them reading a shared table.

Not in the prototype: the retired/deleted notice at the patch address, the deactivation pick and confirmation pages, the CLI verbs for retire, delete, restore, rollback and describe, the connections level of list, and any sweep change. The friction log and astra's evaluation are on the ticket.

Try it

# 1. Bind the seeded admin to your Clerk dev user so the seed's company is yours (seed only, per docs/DEVELOPMENT.md "Seed"):
#    add PATCHY_DEV_CLERK_USER_ID=user_… to ~/.config/patchy-cloud/dev.env
git fetch origin prototype/portal && git worktree add ../portal-proto prototype/portal && cd ../portal-proto
pnpm install && pnpm dev            # prints the API URL for this worktree
pnpm proto:seed                     # colleagues, twelve patches, retired / deleted / deactivated-owner states (pauses ~1 min on the create rate limit)

Open the printed URL's /join, sign in, then:

  1. /: the index lands on the first of Yours. Toggle "Show retired and deleted".
  2. Open lunch-orders: "Used by other patches" lists office-map and expense-form. Click Retire… and read the confirmation; retire it, then restore it from the retired card.
  3. Open sales-dashboard: the title line under the name reads differently from the name. Edit the description; change who can open it; show an older version at the address, then open the address.
  4. Open a card owned by Jonas Weber (deactivated): the admin notice and Reassign….
  5. Stale action: open the same card in two tabs, retire in one, then edit the description in the other.
  6. Switch the header to "Viewing as member" (prototype only, portal pages) and open the same cards: facts and Open, no Manage.
  7. Click Company, Connections and Your machines in the header: same shell, same nav, current section marked.
  8. Delete a patch you own: the typed name, then the deleted card with its days left, then Restore.

The agent's side, from the worktree with the seed token:

pnpm patchy list
pnpm patchy list --state all --json
pnpm patchy list lunch-orders
pnpm patchy list lunch-orders orders

Not breaking: never merges. Retired and deleted patches answer at their address exactly as an unknown patch does; the portal card is the only notice in this prototype.

Prototype built by Claude Fable 5.1 in Claude Code; astra (via omp) evaluated it.

allisonmahmood and others added 5 commits September 14, 2026 23:17
…migration id

The recreated-name test frees the reserved name by SQL after delete, standing in for the eventual reclaim; the runtime upgrade replay applies 0008_prototype_portal after Integrations, since an upgrade from before Runtime cannot carry it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area size:l 501-1,000 changed lines labels Sep 14, 2026
Company, Connections and Your machines rendered in the sign-in card while the portal had its own header, so the pages felt like two products. The header and wide card move into the shared page shell as an app body beside the sign-in card; the portal, Company, Connections and Your machines all render through it, with the current section marked and sign-out in the header.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:server Touches the server area size:l 501-1,000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant