ui(admin): logs-viewer talks to hero_proc; api-docs tracks Bootstrap theme #9

Merged
mik-tf merged 1 commit from development_mik into development 2026-05-23 15:59:31 +00:00
Owner

Closes #7
Closes #8

Summary

  • fw#7: <hero-logs-viewer> gains a logs-rpc-url attribute that defaults to /hero_proc/rpc. Legacy rpc-url kept as a fall-through for back-compat. Precedence: logs-rpc-url > rpc-url > /hero_proc/rpc default.
  • fw#8: <hero-api-docs> sweeps 37 Hero-internal custom-property references (--bg-*, --text-*, --border-color) to Bootstrap 5.3 tokens (--bs-body-bg, --bs-secondary-bg, --bs-tertiary-bg, --bs-body-color, --bs-secondary-color, --bs-border-color) so the chrome flips with data-bs-theme. 16 brand --accent-* references left as-is. Hardcoded fallback values preserved.
  • assets.rs doc-comment updated to show the new attribute-free usage on router-fronted dashboards.

Note on the fw#8 issue framing

The issue body describes a purple gradient header. The actual code paints a solid var(--bg-secondary, #161b22) background (dark gray, no gradient). The Hero-vars to bs-vars swap delivers the requested behaviour (header tracks theme) regardless of color.

Test plan

  • cargo build --workspace --release clean
  • cargo fmt --check exits non-zero on 239 pre-existing fmt-dirty files (stash round-trip confirms 239 -> 239 unchanged by these edits)
  • cargo clippy -D warnings exits non-zero on 16 pre-existing errors in hero_website_lib (stash round-trip confirms 16 -> 16 unchanged)
  • node -c on both modified JS files passes syntax check
  • Live verify on hero_assistance admin dashboard after rebuild: Logs tab fetches /hero_proc/rpc (browser network tab), Docs tab header flips with Bootstrap theme toggle
Closes https://forge.ourworld.tf/lhumina_code/hero_website_framework/issues/7 Closes https://forge.ourworld.tf/lhumina_code/hero_website_framework/issues/8 ## Summary - fw#7: `<hero-logs-viewer>` gains a `logs-rpc-url` attribute that defaults to `/hero_proc/rpc`. Legacy `rpc-url` kept as a fall-through for back-compat. Precedence: `logs-rpc-url` > `rpc-url` > `/hero_proc/rpc` default. - fw#8: `<hero-api-docs>` sweeps 37 Hero-internal custom-property references (`--bg-*`, `--text-*`, `--border-color`) to Bootstrap 5.3 tokens (`--bs-body-bg`, `--bs-secondary-bg`, `--bs-tertiary-bg`, `--bs-body-color`, `--bs-secondary-color`, `--bs-border-color`) so the chrome flips with `data-bs-theme`. 16 brand `--accent-*` references left as-is. Hardcoded fallback values preserved. - assets.rs doc-comment updated to show the new attribute-free usage on router-fronted dashboards. ## Note on the fw#8 issue framing The issue body describes a purple gradient header. The actual code paints a solid `var(--bg-secondary, #161b22)` background (dark gray, no gradient). The Hero-vars to bs-vars swap delivers the requested behaviour (header tracks theme) regardless of color. ## Test plan - [x] `cargo build --workspace --release` clean - [x] `cargo fmt --check` exits non-zero on 239 pre-existing fmt-dirty files (stash round-trip confirms 239 -> 239 unchanged by these edits) - [x] `cargo clippy -D warnings` exits non-zero on 16 pre-existing errors in `hero_website_lib` (stash round-trip confirms 16 -> 16 unchanged) - [x] `node -c` on both modified JS files passes syntax check - [ ] Live verify on hero_assistance admin dashboard after rebuild: Logs tab fetches `/hero_proc/rpc` (browser network tab), Docs tab header flips with Bootstrap theme toggle
fw#7 — <hero-logs-viewer> previously fell back to '/rpc' on the host
dashboard, which routes to whichever service owns the page (e.g. the
_server daemon for hero_assistance) and 404s on logs.filter. Add a new
logs-rpc-url attribute that defaults to '/hero_proc/rpc' (the router-fronted
hero_proc endpoint); keep the legacy rpc-url attribute as a fall-through for
back-compat. Precedence: logs-rpc-url > rpc-url > /hero_proc/rpc default.

fw#8 — <hero-api-docs> previously read Hero-internal custom properties
(--bg-primary, --bg-secondary, --bg-tertiary, --text-primary, --text-secondary,
--text-muted, --border-color) which do not flip when the host page toggles
data-bs-theme. Sweep these references (37 total) to the equivalent Bootstrap
5.3 theme tokens (--bs-body-bg, --bs-secondary-bg, --bs-tertiary-bg,
--bs-body-color, --bs-secondary-color, --bs-border-color) so the chrome
adapts on theme switch. The 16 brand --accent-* references are left as-is;
they are identity colors, not theme tokens. Original hardcoded fallback
values preserved on each reference for safety.

Note: fw#8 issue body describes a 'purple gradient' header — the actual
code paints a solid var(--bg-secondary, #161b22) background (dark gray, no
gradient). The Hero-vars-to-bs-vars swap delivers the requested behaviour
(header tracks theme) regardless of the originally-described color.

assets.rs doc-comment updated to show the new attribute-free usage on
router-fronted dashboards.

Pre-merge gate (workspace, release): build clean. fmt --check exits non-zero
on 239 pre-existing fmt-dirty files (stash round-trip confirms 239 -> 239
unchanged by these edits). clippy -D warnings exits non-zero on 16 pre-existing
errors in hero_website_lib (stash round-trip confirms 16 -> 16 unchanged).
Per s143 / s147 / s148 baseline-debt-pre-existing precedent.

JS syntax verified via node -c on both files.

Closes #7
Closes #8

Signed-by: mik-tf <mik-tf@noreply.invalid>
mik-tf merged commit f7540ae51f into development 2026-05-23 15:59:31 +00:00
mik-tf deleted branch development_mik 2026-05-23 15:59:31 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_website_framework!9
No description provided.