Commit Graph
154 Commits
Author SHA1 Message Date
cgalo5758 38b703c1cf Add recent activity queries and operator timeline 2026-05-16 04:13:05 -05:00
cgalo5758 6baa82f446 Unify operator recent activity into one timeline 2026-05-16 04:07:58 -05:00
cgalo5758 0e7476f79d Add operator Members and Memberships features 2026-05-16 04:01:19 -05:00
cgalo5758 b43c15473e Add billing summary and grant form split 2026-05-16 03:55:07 -05:00
cgalo5758 ec90951be3 Archive operator MPA conversion and update spec 2026-05-16 03:31:44 -05:00
cgalo5758 2aa58d555a Mark 7d SPA to MPA conversion as done
Update IA and status docs to reflect the landed M7d MPA conversion.
- docs/operator-ia.md: switch framing to implemented routes and add
  /operator/persons/{personID} (lookup-only)
- openspec/changes/operator-mpa-conversion/tasks.md: mark verification
  and documentation tasks as completed with notes on checks
- status/milestones.md: flip 7d to Done and summarize what landed
- status/operator-ux.md: add "7d Landed Decisions" section
- docs/design-system.md: small wording tweak about hx-boost navigations
2026-05-16 02:33:03 -05:00
cgalo5758 489af4cef5 Remove legacy operator tabstrip SPA
Delete internal/embeds/static/operator-tabs.js and its include in
operator.html. Replace data-switch-tab triggers with plain /operator
links.
Retire legacy GET /partials/operator/* pane loaders and remove the
tabstrip
branch in templates; collapse dispatch to BodyTemplate/landing. Simplify
GetOperatorPage to 301 legacy ?tab bookmarks and update tests/openspec.
2026-05-16 02:21:12 -05:00
cgalo5758 62910b159f Convert operator people to lookup-only person detail
Add GetPersonPage handler and operator_person_detail.html
Retire the legacy /partials/operator/users list and remove the
People tab/pane from operator.html. Update legacyTabRedirects so
tab=people redirects to /operator
2026-05-16 01:32:08 -05:00
cgalo5758 bd98e1a9a5 Convert Operator billing to MPA pages
Add operator_billing.html wrapper and four GetBilling*Page handlers.
Extract loadBilling*/loadSubscriptions*/loadInvoices*/loadPaymentsData
helpers used by both legacy partial endpoints and the new pages.
Register new /operator/billing/* routes and add legacyTabRedirects
entry.
Add a no-op renderBody stub in fedwiki_partials to satisfy template
parse.
2026-05-16 01:23:29 -05:00
cgalo5758 2a64b86fa2 Add MPA routes for operator catalog pages
Register GET /operator/org-types, /operator/products,
/operator/entitlement-sets and /operator/plan-ladders

Extract load*PageData helpers and reuse them in GetXPage handlers.
Update operator template nav to use ActiveCapability and direct routes,
adjust legacyTabRedirects, and mark tasks in openspec
2026-05-16 01:18:01 -05:00
cgalo5758 f190ddb361 Add operator FedWiki sites integration page
Register GET /operator/fedwiki-sites and add GetFedWikiSitesPage.
Reuse the existing operator_sites.html partial and set page
ActiveCapability/IAPosition. Update nav template link and
legacyTabRedirects, and mark the task done in the openspec tasks list.
2026-05-16 00:36:40 -05:00
cgalo5758 03ad87ef0b Register read-only /operator/grants page
Strip grant create/revoke UI from operator_grants.html; extract
loadGrantsListData to centralize grants hydration. Add GetGrantsPage
handler and register GET /operator/grants, update legacyTabRedirects,
trim renderGrantsPage, and update the tasks checklist.
2026-05-16 00:12:23 -05:00
cgalo5758 2860f27d71 Add MPA handlers and body template dispatch
Introduce a renderBody template func to dispatch dynamic body partials
from operator.html (real implementation in NewOperatorPartialsHandler).
Add GetOrganizationsPage and GetOrganizationDetailPage to render MPA
pages by setting BodyTemplate/BodyData and ActiveCapability on the
OperatorPageData. Refactor enrollment hydration into
loadOrgEnrollmentData,
update templates to use /operator/organizations links and target
2026-05-15 23:47:41 -05:00
cgalo5758 812fa8763d Convert operator panel to MPA layout
Add IA-position meta and OperatorPageData fields (Tab, ShowLanding,
IAPosition). Add .operator-ia-sidebar min-width to stabilize sidebar
label
layout. Add smoke test to render both landing and legacy tabstrip
branches.
Add openspec archive, design, proposal, spec and task docs for
operator-mpa-conversion.
2026-05-15 23:37:16 -05:00
cgalo5758 b479f5981b M7-7b: archive operator-ia change — declare operator panel IA
Define the catalog/runtime/integration layering, per-org composite
view route, curated landing surface, breadcrumb positional contract,
reserved query-param real estate, and single-entry-point grant action
affordances. Adds 6 requirements to operator-panel-navigation; the
legacy ?tab= SPA contract stays until M7d retires it.

Also files an independent tech-debt item for member-console reading
products.product_type directly instead of the billing.product_kinds
view, per upstream membcons-db Doc 35 Product Kind Taxonomy.
2026-05-12 16:16:20 -05:00
cgalo5758 fd7c61d594 Add Operator Panel IA decision record and spec delta
Introduce docs/operator-ia.md and an OpenSpec change "operator-ia" with
design, proposal, spec delta, and tasks; update status to mark M7b In
progress
2026-05-12 15:51:42 -05:00
cgalo5758 7d60af65d1 Archive three demo-seeder & keycloak-fix OpenSpec changes
Move 2026-05-10-member-console-demo-seeder,
2026-05-11-keycloak-id-pinning-fix, and 2026-05-11-demo-seeder-persons
into openspec/changes/archive/ and fold their specs into
openspec/specs/{keycloak-test-seed,member-console-demo-seed}/spec.md.
2026-05-11 10:55:14 -05:00
cgalo5758 9d11ee0328 Add member-console demo seeder with person seeding
Add a `seed-demo` subcommand (cmd/seed_demo.go + internal/demoseed/)
that inserts a fixed reference catalog into the member-console DB so
the operator panel has rows to walk through for UX research. Catalog:
6 demo-* products (4 by product_type + 2 extra plans), 1 plan ladder
with 3 tiers, 1 entitlement set with 2 rules (limit + boolean), and 1
grant on Alice's personal org (once she's logged in).

Person rows for bob/carlos/diana are seeded via provisioning.AutoProvision
keyed on the pinned Keycloak UUIDs — no longer fragile now that
seed-keycloak.sh's partialImport switch preserves the pinned id. Alice
is intentionally NOT pre-seeded so the lazy-creation OIDC flow stays
exercised on every fresh stack.

Idempotency: list+filter by `name` for catalog rows, by `oidc_subject`
for persons. Re-running is a no-op for created rows; warns + skips
the grant if alice hasn't logged in yet.

Host-side invocation only — run `./test/seed-demo.sh` after
bootstrap-stack.sh. Mirrors how member-console itself runs on the
host (config + secrets live under test/).

Two OpenSpec changes folded in: 2026-05-10-member-console-demo-seeder
(the seeder) and 2026-05-11-demo-seeder-persons (the persons follow-up
unlocked by the Keycloak fix).
2026-05-11 10:55:14 -05:00
cgalo5758 dbde5bd59f Fix Keycloak test seed user-id pinning
POST /admin/realms/{realm}/users silently drops the `id` field on
Keycloak 26.x. Switch user creation in seed-keycloak.sh to
POST /admin/realms/{realm}/partialImport, which preserves the pinned
id (verified by round-trip). This restores deterministic UUIDs for
alice/bob/carlos/diana and unblocks downstream consumers that depend
on stable `sub` claims (FedWiki owner.json references, demo seeder
person rows).
2026-05-11 10:55:14 -05:00
cgalo5758 66c8d84a2c worktree test stacks isolation. 2026-04-29 03:28:43 -05:00
cgalo5758 a50084aee5 Add per-worktree test stack bootstrap and docs 2026-04-28 23:16:03 -05:00
cgalo5758 751bae7768 Use plan ladder for org defaults
Add default_plan_ladder_id with a forward data migration and update
the runtime to resolve the ladder's rank-0 tier at use-time. Regenerate
sqlc, update auto-provisioning, ReapplyDefaultsForPool, operator UI and
tests; add GetTierByLadderRank and pool/provision query helpers. Add a
CSP-safe confirm-action modal and wire operator actions to it. Close
plan-sole-writer safety gaps and serialize IssueGrant with a FOR UPDATE
pool lock to prevent ladder races.
2026-04-27 01:57:17 -05:00
cgalo5758 7a7f5975eb Track grant lineage and add Extend transition
Introduce extends_grant_id on grants (models, CreateGrant param and
SQL), add
GetGrantLineage recursive query, and enforce same-org/immutability
guards via
migration triggers. Implement TransitionTarget.Extend with validation
and an
extend path that issues a chained grant + provision. Update docs, specs
and
tests accordingly.
2026-04-26 02:38:46 -05:00
cgalo5758 beab142582 Mark entitlements package-boundary tasks complete 2026-04-25 03:46:22 -05:00
cgalo5758 ba68b8e71b OpenSpec for plan-sole-writer-guards 2026-04-25 03:28:16 -05:00
cgalo5758 8f6a93f74d Add operator enrollment UI and plan docs
Introduce operator enrollment partials and handlers that route plan-tier
granting and revocation through entitlements.Transition(). Add
member-facing
tier labels, plan architecture and grant-plan-safety documentation, plus
unit and e2e tests. Also add small querier helpers and wire Temporal
client
hooks for trial expiration scheduling.
2026-04-24 12:28:00 -05:00
cgalo5758 720e546d16 Add operator plan ladder management UI and backend 2026-04-20 19:52:42 -05:00
cgalo5758 667e9ffe24 Add plan ladders and pool provision transitions
Introduce DB migrations for ladder and pool-attachment tables and an
audit log for provision transitions. Make product_type nullable and add
lifecycle_status plus a product_kinds view. Implement Transition and
ReapplyDefaultsForPool primitives, SQLC queries/models, webhook and
Temporal workflow integration, and accompanying unit/integration tests.
2026-04-19 20:45:56 -05:00
cgalo5758 0b57afb4ec Add plan management foundation design and specs 2026-04-19 14:10:37 -05:00
cgalo5758 25a206e371 Fix operator panel tabs 2026-04-13 02:22:49 -05:00
cgalo5758 bafa42b9a9 Use Product as Org Type Default 2026-04-12 16:56:25 -05:00
cgalo5758 1a89bbd292 Products page done. 2026-04-11 20:40:36 -05:00
cgalo5758 fe2767f5d1 Add OpenSpec for Member Products page 2026-04-11 19:49:12 -05:00
cgalo5758 6f2788b9a0 Enable auto-provision of default entitlements. 2026-04-10 14:15:13 -05:00
cgalo5758 64ced89432 Stripe Integration Price creation. 2026-04-07 03:24:12 -05:00
cgalo5758 be91b73dbd Stripe Operator UI 2026-04-06 03:15:20 -05:00
cgalo5758 18a0969ad3 Stripe invoice payment projections. 2026-04-05 03:51:31 -05:00
cgalo5758 82e1b2bd23 Close subscription creation spec workflow 2026-04-05 02:45:51 -05:00
cgalo5758 7ef1d32529 Stripe subcription creation 2026-04-05 02:00:07 -05:00
cgalo5758 e5698d5fcc Stripe product catalog sync. 2026-04-04 14:58:18 -05:00
cgalo5758 d0a1684216 Openspec for stripe product catalog sync 2026-04-04 14:08:49 -05:00
cgalo5758 3d602c0601 Add billing accounts and Stripe customer sync 2026-04-04 04:08:23 -05:00
cgalo5758 2023c38339 Add Stripe customer mapping design and specs 2026-04-03 20:21:37 -05:00
cgalo5758 3aad9268df Stripe Billing Plumbing 2026-04-03 19:25:24 -05:00
cgalo5758 e993fccf03 Add Stripe billing plumbing open spec 2026-04-03 18:54:47 -05:00
cgalo5758 cd232130f2 Introduce per-module PostgreSQL schemas 2026-04-03 03:27:48 -05:00
cgalo5758 fb02411f35 Introduce DB schema separation (core and fedwiki)
Add a goose migration to create core and fedwiki schemas and move
existing
domain tables using ALTER TABLE IF EXISTS. Set connection search_path to
"core, public" after successful DB ping. Update FedWiki SQL and
sqlc.yaml to
use fedwiki.sites and include db migrations for schema awareness. Add
design
docs, specs, and tasks for schema-namespacing and the migration plan.
2026-03-30 15:16:43 -05:00
cgalo5758 675a4d93a3 Buffer template rendering and fix FedWiki sync
Introduce SafeTemplates.Render to execute templates into a buffer and
prevent partial HTML on errors. Replace direct ExecuteTemplate calls in
partial handlers and add a make lint-templates target to catch bypasses.
Update operator sites template/view model to use OwnerOrgName. Guard the
FedWiki sync by skipping inserts when DefaultWorkspaceID is empty and
scope deletes to the configured default workspace only.
2026-03-29 04:58:02 -05:00
cgalo5758 47a75e0873 Add products, entitlement sets, and workspace support
- Add SQL queries and generated methods for Create/List/Update products
- Add CountWorkspacesByOrgID and ListResourceKeys querier methods
- Register workspace partials and operator routes for products and sets
- Add workspace UI section and operator tabs; tweak grant/site forms
- Replace isValidDNSLabel with validateDNSLabel for site validation
2026-03-27 10:55:03 -05:00
cgalo5758 15e1a59fe7 Introduce entitlement sets and migrations
Add entitlement_sets and entitlement_set_rules with seed data and a
migration that backfills products, grants, and pool_provisions, then
removes product_entitlement_rules. Update Go models, sqlc queries,
materialization, and grant/provision flows to use entitlement_set_id.
Fix assembleMigrations to assign stable per-module numeric namespaces.
Move DB docs to docs/database-management.md and add design/specs/tests.
2026-03-26 18:19:19 -05:00