fix(db_ui): hoist rpc() definition above component scripts #26

Merged
zaelgohary merged 2 commits from development_fix_db_rpc_scope into development 2026-04-30 11:33:33 +00:00
Member

Summary

Component scripts in hero_db_ui templates (e.g. stats_card.html, database_manager.html) call rpc(...) and refreshStats() at the end of their inline script blocks, but the rpc() function was defined later in base.html — after the content block. Result: ReferenceError: rpc is not defined on every page load. Also drops the broken <link href="/hero-bootstrap-bridge.css"> from base.html and login.html.

Bootstrap-bridge link removal is part of hero_archipelagos#197 (cross-repo sweep).

Changes

  • Hoist rpc() and getSelectedDb() to an early <script> block in base.html.
  • Remove the now-duplicate definitions from the later script block.
  • Drop the broken /hero-bootstrap-bridge.css link from base.html and login.html.

Test Results

cargo build, smoke test in browser — refreshStats/loadDatabases now run without ReferenceError. Playwright qa_fix_verification spec passes.

## Summary Component scripts in hero_db_ui templates (e.g. stats_card.html, database_manager.html) call `rpc(...)` and `refreshStats()` at the end of their inline script blocks, but the `rpc()` function was defined later in base.html — after the content block. Result: `ReferenceError: rpc is not defined` on every page load. Also drops the broken `<link href="/hero-bootstrap-bridge.css">` from base.html and login.html. ## Related Issue Bootstrap-bridge link removal is part of hero_archipelagos#197 (cross-repo sweep). ## Changes - Hoist `rpc()` and `getSelectedDb()` to an early `<script>` block in base.html. - Remove the now-duplicate definitions from the later script block. - Drop the broken `/hero-bootstrap-bridge.css` link from base.html and login.html. ## Test Results cargo build, smoke test in browser — refreshStats/loadDatabases now run without ReferenceError. Playwright `qa_fix_verification` spec passes.
fix(db_ui): hoist rpc() definition above component scripts so refreshStats/loadDatabases stop ReferenceError-ing
Some checks failed
CI / cargo test (pull_request) Failing after 3s
CI / cargo check + clippy (pull_request) Successful in 59s
Build and Test / build (pull_request) Has been cancelled
0884652d3a
fix(db_ui): drop broken /hero-bootstrap-bridge.css link
Some checks failed
CI / cargo check + clippy (pull_request) Failing after 3s
CI / cargo test (pull_request) Failing after 3s
Build and Test / build (pull_request) Successful in 3m4s
4ffbba64bb
zaelgohary force-pushed development_fix_db_rpc_scope from 4ffbba64bb
Some checks failed
CI / cargo check + clippy (pull_request) Failing after 3s
CI / cargo test (pull_request) Failing after 3s
Build and Test / build (pull_request) Successful in 3m4s
to 7e4b62482d
Some checks failed
CI / cargo check + clippy (pull_request) Failing after 3s
CI / cargo test (pull_request) Successful in 1m38s
Build and Test / build (pull_request) Successful in 3m46s
2026-04-30 11:28:22 +00:00
Compare
zaelgohary merged commit 0988911266 into development 2026-04-30 11:33:33 +00:00
zaelgohary deleted branch development_fix_db_rpc_scope 2026-04-30 11:33:33 +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_db!26
No description provided.