Skip to content

feat: compact default model route labels#2369

Merged
jolestar merged 1 commit into
mainfrom
feat/model-route-compact-display
Jul 22, 2026
Merged

feat: compact default model route labels#2369
jolestar merged 1 commit into
mainfrom
feat/model-route-compact-display

Conversation

@jolestar

Copy link
Copy Markdown
Collaborator

Summary

  • add an explicit compact presentation for ModelRouteRef that renders provider@default/model as provider/model
  • use compact labels in CLI/TUI/runtime hints and Web GUI rendering surfaces while preserving canonical route values for parsing, serialization, persistence, comparison, DTOs, and API submissions
  • document the presentation-only boundary and cover default/non-default/malformed values with Rust and Web GUI tests

Verification

  • cargo test compact
  • cargo test model_status_distinguishes_inherited_override_and_fallback
  • cargo fmt --all -- --check
  • RUSTFLAGS="-D warnings" cargo check --all-targets
  • npm test (web-gui/app: 225 passed)
  • npm run typecheck (web-gui/app)

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holon Ready Ready Preview, Comment Jul 22, 2026 12:33am

@jolestar

Copy link
Copy Markdown
Collaborator Author

Review: APPROVED ✅

Summary

Clean presentation-only change: adds compact display for ModelRouteRef that renders provider@default/model as provider/model while preserving canonical values for serialization, persistence, API, and comparison.

Findings

  • Boundary discipline: Excellent. as_compact_display() is clearly documented as presentation-only in the RFC. All machine-readable surfaces (serialization, persistence, DTOs, API) continue using as_string() / canonical form.
  • Rust implementation: Correct. compact_model_route_display helper uses parse-fallback for robustness against malformed inputs.
  • Web GUI implementation: Correct with proper edge case handling (no slash, empty model, legacy format).
  • Test coverage: Comprehensive — Rust tests cover default/non-default routes, serialization identity preservation, runtime hint formatting, TUI rendering. Web tests cover default, non-default, legacy, and malformed inputs.
  • Consistency: All 14 changed files consistently apply compact display only to human-facing surfaces.

Non-blocking note

  • DashboardPage title attribute now also shows compact form — reasonable UX choice, minor trade-off.

Waiting for CI to complete before merge.

@holonbot holonbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: APPROVE

Clean, well-bounded presentation-only change. The compact display projection for ModelRouteRef is consistently enforced across all Rust and Web GUI display surfaces, canonical values are preserved for serialization/persistence/API/test identity, and test coverage is thorough.

Minor nit

web-gui/app/src/features/dashboard/DashboardPage.tsx:127 — The <div title> tooltip also uses the compact form. Tooltips are a natural surface for exposing the full canonical route to power users. Consider using title={agent.model} to retain the canonical value there while keeping the visible <dd> compact. This is optional — the current behavior is internally consistent.

Assessment

  • Correctness: No issues. as_compact_display() correctly delegates to model_ref().as_string() for default endpoints. The TypeScript compactModelRouteDisplay handles malformed inputs defensively.
  • Boundary discipline: All serialization, persistence, API values, comparison keys, and test assertions continue to use canonical .as_string().
  • Test coverage: Strong on both Rust and TypeScript sides — covers default, non-default, and malformed inputs, plus canonical identity preservation.
  • Documentation: RFC update clearly states the compact form is presentation-only.
  • Scope: Focused — no unrelated changes.

@holonbot

holonbot Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Holon Run Report

@jolestar
jolestar merged commit 5874a09 into main Jul 22, 2026
8 checks passed
@jolestar
jolestar deleted the feat/model-route-compact-display branch July 22, 2026 00:49
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