Commit Graph
42 Commits
Author SHA1 Message Date
cgalo5758 71818de0bd Add setup checklist and empty-state guidance
Implement the ux-first-run change: a state-derived setup checklist on
/operator/setup with a landing region that recedes once required steps
are done, and empty states that distinguish blocked from empty across
operator and member surfaces. Also add production deployment and
environment reference docs, plus a config-key completeness test.
2026-08-23 03:06:11 -05:00
cgalo5758 8e3c68c6be Make UI surfaces honestly reflect system state
- Add deployment-name branding to titles, mastheads, and OG tags
- Share one grant delivery-state query with lineage across grants
  surfaces
- Show pool status/usage, org owners, and config readiness
- Make billing views projection-aware with recency and sync vocabulary
- Guard FedWiki creation without domains and render route-aware 404s
2026-08-23 01:45:52 -05:00
cgalo5758 8e7e0dd04d Harden container, OIDC auth, and error handling
Run Docker runtime stage as non-root user app (UID 65532).

Add styled full-page 404/500 error rendering for navigation requests
while preserving plain-text responses for HTMX partials.

Reuse recent unconsumed OIDC login state to avoid state mismatch on
parallel login hits, and merge resource_access in role extraction.

Re-level template headings, add autocomplete tokens, and resolve
catalog resource display names.

Self-label test-stack secrets and document CSRF secret rotation.
2026-07-31 23:27:15 -05:00
cgalo5758 ce3668d59e Refine operator overview metrics and styling
Replace domain claims with open invoices, show monthly recurring
revenue,
count team organizations, and add more informative trend captions.

Use standard bordered cards and add a README screenshot with reversible
sample-data tooling.
2026-07-27 02:44:55 -05:00
cgalo5758 4cec3868d4 Rebuild the operator landing as a real overview
Replace the bare landing panel with a four-region overview: lookup, an
"At a glance" tile row, a unified activity timeline, and a System rail.

The tiles are chosen so each earns its place and each drills into a real
operator section, which makes the row double as navigation for an
operator who arrived without a destination. People carries no link
because there is no persons browse route by design -- persons are reached
by lookup. Grants and provisions share one tile: the headline counts
grants and the caption names the active provisions it was joined against,
so the ledger-versus-delivery distinction is visible on the page instead
of only in the SQL.

Every count degrades independently, like the activity feed already did. A
failed count renders an em dash and says so; it never renders zero, since
an operator reading "0 organizations" off a broken query would draw
exactly the wrong conclusion. This is the surface people reach for when
something is already wrong, so it has to render under partial failure.

The System rail reports every registered provider, not just the
provisioning ones the sidebar lists, and splits the outbox by what an
operator would do about each bucket -- only dead-lettered work, which has
exhausted its retries, gets the alarm.

Headings run H1 to H3 with no skipped levels; the H1-to-H6 pattern of the
older operator pages is deliberately not copied. The stat-tile hover and
focus affordance lives in app.css because Bootstrap cards are containers,
not controls, and it is suppressed under reduced-motion. No new JS, no
inline script, handler or style attribute.

The shell's title and brand no longer name a specific deployment: this is
general-purpose OSS and the operator surface is the first page a stranger
evaluating the project sees.

Covered by operator_overview_render_test.go, which renders the template
without a database and guards the outline, the CSP constraints, the
brand neutrality, the empty states, and the em-dash-not-zero rule.
2026-07-25 15:44:36 -05:00
cgalo5758 c85ac6acdc Add domain claim lifecycle safeguards
Make claim windows and workspace caps configurable, and enforce
initiation
and abandonment budgets without penalizing DNS evidence or system
failures.
Add operator visibility into live claims and default verification to 24
hours.
2026-07-25 00:40:24 -05:00
cgalo5758 75d350f88b Replace org type backfill with previewed changes
Require explicit grandfather or migrate dispositions for outgoing
defaults.
Treat any live plan attachment as blocking baseline restoration.
2026-07-11 21:02:17 -05:00
cgalo5758 8514df5b50 Remediate operator UX audit findings
Fix HTMX expired-session handling, CSP-blocked form behaviors, reorder
recovery, billing currency display, plan/checkout guards, FedWiki quota
edge cases, and operator/member empty/error states.

Add entitlement uniqueness migrations, canonical migration source
wiring,
and regression coverage for the remediated flows. Update status docs
with
the audit triage and model inventory.
2026-07-03 11:58:03 -05:00
cgalo5758 101b71b68e Add drag reorder for ladder tiers
Replace absolute rank edits with a SortableJS row reorder route that
posts the
full product order and renumbers ranks transactionally with temporary
negative
values. Share the sortable initializer with topology column ordering.
2026-06-30 13:11:01 -05:00
cgalo5758 23ecf2ba87 Implement drag-and-drop plan ladder reordering
- Add SortableJS drag-to-reorder for ladder columns on the topology
  overview page
- Remove the manual "Sort order" input from the ladder edit form
- Add SetPlanLadderSortOrder SQL query and remove sort_order from
  UpdatePlanLadder
- Update templates, CSS, specs, and tests to support the new flow
2026-06-30 02:23:45 -05:00
cgalo5758 9b369c2c58 Add operator Integrations section
Expose `/operator/integrations` as a registry-driven landing for
provisioning providers, with provider links nested under the new sidebar
entry.

Update the OpenSpec archive and mark milestone 9b done.
2026-06-24 19:21:15 -05:00
cgalo5758 8ad678836b fix: grant "Valid Until" parsed as UTC, expiring trials immediately
The operator grant forms use <input type="datetime-local">, which submits a
naive wall-clock string with no timezone. The handlers parsed it with time.Parse,
whose default for a zone-less value is UTC — so for an operator behind UTC, a
near-future pick resolved to a past instant, GrantExpirationWorkflow saw a
past valid_until and fired immediately, and the plan reverted to the default at
once instead of lasting the chosen window.

- Route IssueGrant and ExtendGrant through one parseGrantValidUntil helper.
- Interpret the value in the server's local zone (time.ParseInLocation), and when
  the browser supplies valid_until_offset (grant-valid-until-tz.js, attached on
  htmx:configRequest) resolve the exact instant regardless of server timezone.
- Reject a Valid Until in the past.
2026-06-23 17:11:03 -05:00
cgalo5758 d7839aa526 Add provider registry contract
Register FedWiki and Stripe providers at boot, persist provider
operations, and stamp owned resource keys.

Rename the FedWiki entitlement key from `sites` to `fedwiki_sites`
and drive the operator integration nav from provisioning providers.
2026-06-15 22:31:51 -05:00
cgalo5758 d0b6a1d54b Add operator plan topology overview
Add a read-only operator surface at GET /operator/plan-topology with a
server-rendered cross-ladder grid (ladders by sort_order × ranks).
Include
shared-product detection via a new sqlc query (ListSharedTierProducts),
sticky rank-column CSS, add-on strip, org-type provisioning summary, and
a
reverse index of shared memberships. Register route/nav, add handler,
template, tests, specs, and docs.
2026-05-30 23:18:46 -05:00
cgalo5758 46f727fb21 Use #operator-body as HTMX swap target
Add per-field validation UI (is-invalid + invalid-feedback) and
propagate FieldErrors in view models. Replace HTMX "Back" buttons with
regular links. Initialize web.New() for collecting form errors. Register
a /partials/ 404 handler to prevent accidental dashboard swaps during
HTMX partial requests.
2026-05-17 14:34:05 -05:00
cgalo5758 0eddf80e3f Use HTMX for operator lookup and add partial 2026-05-16 04:23:57 -05:00
cgalo5758 aef0ee81bd Add operator lookup form, handler, and query
Resolve lookup terms for person/org on the operator landing
surface. POST /operator/lookup calls identity.LookupPersons (email-exact
first, else name ILIKE) then falls back to org slug lookup.

Use 303 redirects for unique person/org matches; ambiguous or no-match
results are re-rendered inline on the landing page via renderLanding.
2026-05-16 04:18:52 -05:00
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 afa2557d84 Unify sidebar styling and cap content width
Apply a shared .app-sidebar class and stronger active-state styling
(accent bar, tinted background, increased weight). Use <aside> for
semantic markup. Add operator-ia-group-start to create hairline group
separators. Wrap main content in container-xxl to limit line length.
Remove redundant bolded nav labels and the "Find an organization" CTA.
2026-05-16 03:14:55 -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 8d15a1b89b Add design system and success toast, fix CSS 2026-05-14 04:44:36 -05:00
cgalo5758 690c70b113 Add cross-tab HTMX triggers and planLadderMutation
Signal dependent tabs to re-fetch when plan ladders change.
operator_plan_ladders handlers set HX-Trigger: planLadderMutation on
create/update/delete and tier operations so Org Types' plan dropdowns
refresh. operator.html adds explanatory comments and hx-trigger attrs
so Org Types, Grants, and Products panes listen for productMutation,
planLadderMutation, and entitlementMutation
2026-04-27 02:05:59 -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 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 25a206e371 Fix operator panel tabs 2026-04-13 02:22:49 -05:00
cgalo5758 1a89bbd292 Products page done. 2026-04-11 20:40:36 -05:00
cgalo5758 6f2788b9a0 Enable auto-provision of default entitlements. 2026-04-10 14:15:13 -05:00
cgalo5758 be91b73dbd Stripe Operator UI 2026-04-06 03:15:20 -05:00
cgalo5758 60c275e512 Add HTMX docs and exempt /static/ from auth 2026-03-27 16:15:55 -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 6330ae7a42 Grants management! 2026-03-24 17:35:14 -05:00
cgalo5758 f737dd0314 Identity and organization modules. 2026-03-23 17:28:14 -05:00
cgalo5758 1860ec6068 feat: Implement operator dashboard with user, site, and payment management views. 2026-01-17 15:56:22 -06:00