Skip to content

Commit 59a0932

Browse files
ldionneclaude
andcommitted
[UI] Reorganize navbar: flatten to suite-agnostic links, add API/Test Suites
Replace the three-category navbar (suite-scoped, analysis, admin) and suite selector dropdown with a simpler flat layout where all links are suite-agnostic: [LNT] [Test Suites] [Graph] [Compare] [API] <--> [v4 UI] [Admin] [Settings] - Remove suite selector dropdown from navbar entirely - Remove suite-scoped links (Dashboard, Regressions, Machines) from navbar - Add "Test Suites" link (suite-agnostic placeholder page at /v5/test-suites) - Add "API" link (opens Swagger UI in new tab) - Add suite-agnostic Dashboard placeholder at /v5/ - Move Admin and v4 UI to right side - v4 UI link now points to v4 root page instead of suite-specific URL - Extract buildNavLink() helper to unify link construction - Pass abort signal to getApiKeys() refresh calls in admin page Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 0f4136a commit 59a0932

14 files changed

Lines changed: 450 additions & 587 deletions

File tree

docs/design/v5-ui.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ The v4 UI stays around as-is. The only integration point is a toggle link in eac
3030

3131
The v5 API only supports the default DB, so v5 frontend routes do not include `db_<db_name>` prefixes.
3232

33-
Suite-agnostic pages (admin, graph, compare) are served at top-level `/v5/` routes with `data-testsuite=""`, while suite-scoped pages use the catch-all route which passes the test suite name as `data-testsuite`.
33+
Suite-agnostic pages (dashboard, test suites, admin, graph, compare) are served at top-level `/v5/` routes with `data-testsuite=""`, while suite-scoped pages use the catch-all route which passes the test suite name as `data-testsuite`.
3434

3535
```python
3636
# lnt/server/ui/v5/views.py
37+
@v5_frontend.route("/v5/", strict_slashes=False)
38+
@v5_frontend.route("/v5/test-suites", strict_slashes=False)
3739
@v5_frontend.route("/v5/admin", strict_slashes=False)
3840
@v5_frontend.route("/v5/graph", strict_slashes=False)
3941
@v5_frontend.route("/v5/compare", strict_slashes=False)
@@ -53,14 +55,16 @@ The shell template (`v5_app.html`) is a standalone HTML page (it does NOT extend
5355
### v4/v5 Toggle
5456

5557
- In the v4 navbar (`layout.html`): add a "v5 UI" link in the top-right of the nav bar (next to the "System" dropdown, not inside any dropdown menu) pointing to `/v5/{ts}/`
56-
- In the v5 SPA navbar: a "v4 UI" link pointing to `/v4/{ts}/recent_activity`
58+
- In the v5 SPA navbar: a "v4 UI" link pointing to the v4 root page (`/`)
5759

5860
---
5961

6062
## Page Hierarchy
6163

6264
```
63-
/v5/{ts}/ Dashboard (landing page)
65+
/v5/ Dashboard (landing page — suite-agnostic placeholder)
66+
/v5/test-suites Test Suites (suite-agnostic placeholder)
67+
/v5/{ts}/ Suite root (suite-specific dashboard)
6468
/v5/{ts}/machines Machine List
6569
/v5/{ts}/machines/{name} Machine Detail
6670
/v5/{ts}/runs/{uuid} Run Detail
@@ -76,28 +80,25 @@ The shell template (`v5_app.html`) is a standalone HTML page (it does NOT extend
7680
### Navigation Bar
7781
7882
```
79-
[LNT] [Suite: nts ▾] Dashboard Graph Compare Regressions Machines Admin [v4 UI] [Settings]
83+
[LNT] [Test Suites] [Graph] [Compare] [API] <------------> [v4 UI] [Admin] [Settings]
8084
```
8185
82-
Navigation links fall into three categories based on their routing behavior:
86+
All navbar links are suite-agnostic. The navbar behavior depends on the page context:
8387
84-
- **Suite-scoped links** (Dashboard, Machines, Regressions): In suite context (`/v5/{ts}/...`), these are SPA navigations within the current suite. In suite-agnostic context (`/v5/graph`, `/v5/compare`, `/v5/admin`), these are full-page links that navigate to `/v5/{ts}/...` (using the suite selector's current value).
85-
- **Analysis links** (Graph, Compare): In suite context, these are full-page links to `/v5/graph?suite={ts}` and `/v5/compare?suite_a={ts}`, pre-filling the current suite. In suite-agnostic context, these are SPA navigations within the agnostic shell.
86-
- **Admin**: In suite context, this is a full-page link to `/v5/admin`. In suite-agnostic context, this is SPA navigation.
88+
- **Suite-agnostic context** (`/v5/...` without a suite): All navbar links use SPA navigation. API opens in a new tab. v4 UI is external.
89+
- **Suite-scoped context** (`/v5/{ts}/...`): All navbar links use full-page navigation (since they target `/v5/...` which is outside the suite basePath `/v5/{ts}`).
90+
91+
Graph and Compare links append `?suite={ts}` / `?suite_a={ts}` when navigated from suite-scoped context, pre-filling the current suite.
8792
8893
---
8994
9095
## Page Details
9196
92-
### 1. Dashboard — `/v5/{ts}/`
93-
94-
The landing page. Order-centric view answering "what happened with recent commits?"
97+
### 1. Dashboard — `/v5/`
9598
96-
| Section | Shows | API Calls |
97-
|---------|-------|-----------|
98-
| Recent Orders | Table of recent orders with two columns: order value with tag suffix when set (e.g. "abc123 (release-18)"), linked to Order Detail; and latest run timestamp, linked to Run Detail. | `GET runs?sort=-start_time&limit=...` (derive orders from runs), then `GET orders/{value}` per unique order to fetch tags |
99+
Suite-agnostic landing page. Currently a placeholder — content to be designed later.
99100
100-
**Links out**: Order Detail, Run Detail.
101+
The existing suite-specific dashboard content (recent orders table) remains accessible at `/v5/{ts}/` as the suite root page.
101102
102103
### 2. Machine List — `/v5/{ts}/machines`
103104
@@ -346,7 +347,9 @@ lnt/server/ui/v5/frontend/src/
346347
├── combobox.ts Reuse existing combobox widget
347348
├── style.css Extend existing styles
348349
├── pages/
349-
│ ├── dashboard.ts
350+
│ ├── home.ts Suite-agnostic dashboard (placeholder)
351+
│ ├── test-suites.ts Suite-agnostic test suites page (placeholder)
352+
│ ├── dashboard.ts Suite-specific dashboard (recent orders)
350353
│ ├── machine-list.ts
351354
│ ├── machine-detail.ts
352355
│ ├── run-detail.ts

0 commit comments

Comments
 (0)