Skip to content

feat: dashboard component kit, print mode, serve.rs split#40

Merged
avrabe merged 1 commit intomainfrom
feat/dashboard-v2
Mar 18, 2026
Merged

feat: dashboard component kit, print mode, serve.rs split#40
avrabe merged 1 commit intomainfrom
feat/dashboard-v2

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Mar 18, 2026

Summary

Split monolithic serve.rs (8359 lines) into modular serve/ directory with reusable UI components and print mode.

serve/ module structure

File Lines Purpose
mod.rs 811 Router, middleware, AppState, utilities
styles.rs 646 CSS constant
js.rs 1193 JS constants (graph, search, AADL)
layout.rs 264 page_layout + print_layout
views.rs 5534 All view handlers
components.rs 522 Reusable UI kit (16 unit tests)

Component kit

  • ViewParams — shared URL query param struct for all views
  • FilterBar — type checkboxes, status dropdown, HTMX-debounced search
  • SortableTable — clickable column headers with URL-persisted sort
  • Pagination — page controls with URL state
  • CollapsibleTree — fold/unfold with URL-persisted open IDs

Print mode

  • ?print=1 on any route strips nav/context bar/HTMX/JS
  • Print button in context bar opens clean view in new tab

Pre-commit hook fixes

  • +stable for clippy (nightly doesn't ship clippy)
  • Remove invalid --strict flag from validate hook

Test plan

  • 444 Rust tests pass
  • clippy clean
  • fmt clean
  • All hooks pass

🤖 Generated with Claude Code

…components

Split monolithic serve.rs (8359 lines) into serve/ module directory:
- mod.rs (811) — AppState, router, middleware, utilities
- styles.rs (646) — CSS constant
- js.rs (1193) — GRAPH_JS, SEARCH_JS, AADL_JS
- layout.rs (264) — page_layout + print_layout
- views.rs (5534) — all view handlers
- components.rs (522) — reusable UI kit with 16 unit tests

Component kit: ViewParams, FilterBar, SortableTable, Pagination,
CollapsibleTree — all URL-param-aware for state persistence.

Print mode: ?print=1 strips nav/context bar/HTMX for clean output.
Print button added to context bar.

Also fix pre-commit hooks: +stable for clippy, remove invalid --strict
flag from validate hook.

Implements: FEAT-052
Refs: DD-005

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit 79a1b57 into main Mar 18, 2026
12 checks passed
@avrabe avrabe deleted the feat/dashboard-v2 branch March 18, 2026 05:47
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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