Skip to content

admin/models-explorer: sorting, default sort, tooltips, orgs cross-model links#823

Merged
benben merged 2 commits into
mainfrom
ben/models-explorer-sort-tooltips
Jun 29, 2026
Merged

admin/models-explorer: sorting, default sort, tooltips, orgs cross-model links#823
benben merged 2 commits into
mainfrom
ben/models-explorer-sort-tooltips

Conversation

@benben

@benben benben commented Jun 29, 2026

Copy link
Copy Markdown
Member

UX follow-ups to the models explorer (#821). Pure frontend (static/models.html); embedded via //go:embed, ships on the next CP image build.

  • Column sorting — click a header to sort ascending (▲), again to flip (▼). Numeric-aware; booleans + nested object/array cells sort by JSON; empty/null sink to the bottom.
  • Default sort — opens (and on every model switch) sorted by the first column ascending, instead of raw DB order.
  • Column tooltipsCOLUMN_TOOLTIPS[model][column] rendered as native title= (violet ⓘ + dotted underline). Seeded for orgs.hostname_alias (SNI fallback), orgs.users, orgs.warehouse.
  • Orgs cross-model links — the users cell shows a live per-org user count → clicks into Org Users filtered to that org; the warehouse cell links to that org's Managed Warehouses row (warehouse PK = org name), or when none. Counts/presence computed client-side (fetch org-users + managed-warehouses, group by org_id) since /models/orgs doesn't preload them; link clicks call selectModel(model, filter) and don't trigger the row-detail handler.

🤖 Generated with Claude Code

- Click a column header to sort (▲ asc); click again to flip (▼). Numeric-aware
  comparison, booleans and nested object/array cells sort by JSON, empty/null
  values always sink to the bottom regardless of direction.
- On load (and model switch) the table defaults to sorting by the first column
  ascending, so it opens in a defined, visible order instead of raw DB order.
- Per-column header tooltips via a COLUMN_TOOLTIPS[model][column] map rendered as
  native title= (ⓘ marker + dotted underline). Seeded with orgs.hostname_alias
  explaining the SNI fallback (empty alias -> database_name -> org name).
@github-actions

Copy link
Copy Markdown

Test Impact Plan

Deterministic summary of how this PR changes tests, CI runners, and coverage-risk signals.

Summary

Area Added Changed Deleted
Test files 0 0 0
E2E/journey files 0 0 0
Workflow files 0 0 0

Signals

  • Test cases: +0 / -0
  • Assertions: +0 / -0
  • Skips or known failures added: 0
  • Workflow continue-on-error added: 0
  • Workflow path filters added: 0
  • Test commands removed from justfile: 0
  • E2E/journey retry lines added: 0

Coverage risk: neutral or increased

No coverage-reduction warnings detected.

…l nav)

The orgs table now renders:
- users: a live per-org user count, clickable → opens Org Users filtered to that
  org.
- warehouse: a 'warehouse →' link (or — when none), clickable → opens Managed
  Warehouses filtered to that org (warehouse PK = org name).

Counts/presence are computed client-side (fetch org-users + managed-warehouses,
group by org_id) because the /models/orgs listing does not preload them. Cross-
model link clicks stop the row-detail handler and call selectModel(model,
filter). Header tooltips added for both columns.
@benben benben changed the title admin/models-explorer: column sorting + default sort + column tooltips admin/models-explorer: sorting, default sort, tooltips, orgs cross-model links Jun 29, 2026
@benben benben merged commit 0385c9a into main Jun 29, 2026
23 checks passed
@benben benben deleted the ben/models-explorer-sort-tooltips branch June 29, 2026 13:47
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.

1 participant