fix history and better click on row #3

Open
opened 2026-03-25 05:54:09 +00:00 by despiegk · 3 comments
Owner

click not good to view

image
when we click on a row we should go to

the view of slides

history of slides

  • do the slides horizontal (like now, don't wrap), so we can go to right, use slider if out of screen
  • then have history vertical underneith slide, so we can easily see history
  • allow to pick history and put it back
## click not good to view ![image](/attachments/ae5536b5-2a97-4df5-91dc-6d8b6ae3de65) when we click on a row we should go to the view of slides ## history of slides - do the slides horizontal (like now, don't wrap), so we can go to right, use slider if out of screen - then have history vertical underneith slide, so we can easily see history - allow to pick history and put it back
Author
Owner

Implementation Spec for Issue #3 — "fix history and better click on row"

Objective

Two separate UX improvements to the HeroSlides dashboard:

  1. Fix row click navigation: clicking a row in the Decks table should navigate to the Slides tab for that deck (view mode), not open the fullscreen presentation player.
  2. Redesign the version history panel: replace the current layout with an inline, horizontally-scrolling slide strip above a vertically-scrolling history list, so a user can pick any slide and browse its full generation history.

Requirements

  • Clicking anywhere on a deck row in the Decks table (#decks-tbody tr) should call viewDeck(path) (switch to Slides tab and load that deck), not openPresentation(path).
  • The existing "eye" icon action button and context-menu "View Slides" item remain unchanged.
  • The slide strip in the version history panel should scroll horizontally (no wrapping).
  • Below the horizontal strip, the history list for the selected slide scrolls vertically.
  • Clicking a slide thumbnail in the strip selects it and loads its version history below.
  • Restore/preview actions per version card remain functionally identical.

Files to Modify

File Change
crates/hero_slides_ui/static/js/dashboard.js Fix row click handler in renderDecks(); refactor version panel JS
crates/hero_slides_ui/static/css/dashboard.css Add CSS for horizontal slide strip
crates/hero_slides_ui/templates/index.html Update #version-panel HTML structure

No Rust server-side changes required.


Implementation Plan

Step 1 — Fix deck row click to navigate to Slides view

File: dashboard.js
In renderDecks(), change onclick="openPresentation(...)" to onclick="viewDeck(...)" on the <tr> element. The fullscreen presentation player remains accessible via the right-click context menu.

Step 2 — Update version panel HTML structure

File: index.html
Add #version-slide-strip (horizontal strip) and #version-selected-label (slide name label) between the panel header and #version-list.

Step 3 — Add CSS for horizontal slide strip

File: dashboard.css
Add .version-slide-strip (flex, no-wrap, overflow-x: auto), .version-slide-thumb (90×51px, selected state), .version-slide-thumb-placeholder, and .version-selected-label rules.

Step 4 — Refactor version panel JavaScript

File: dashboard.js

  • Add versionSelectedSlide module-level variable
  • Rewrite openVersionPanel(slideName) to load all slides via deck.get RPC and render the strip
  • Add renderVersionSlideStrip(slides, selectedName) function
  • Add selectVersionSlide(name) function
  • Add loadVersionHistory(slideName) function (extracts async fetch logic)

Acceptance Criteria

  • Clicking a deck row switches to Slides tab and loads that deck
  • Fullscreen presentation still accessible via context menu
  • Version history panel shows horizontal non-wrapping scrollable slide strip
  • Slides without PNG show as labelled placeholder boxes
  • Initially-opened slide is highlighted in the strip
  • Clicking a different slide thumbnail updates the history list
  • Version cards render correctly in the vertical history list
  • Restore/preview buttons still work

Notes

  • deck.get RPC already returns slides array with name and has_png fields — no new server code needed.
  • versionSlideName module-level variable is already used by restoreVersion/previewVersion and must remain set correctly.
## Implementation Spec for Issue #3 — "fix history and better click on row" ### Objective Two separate UX improvements to the HeroSlides dashboard: 1. **Fix row click navigation**: clicking a row in the Decks table should navigate to the Slides tab for that deck (view mode), not open the fullscreen presentation player. 2. **Redesign the version history panel**: replace the current layout with an inline, horizontally-scrolling slide strip above a vertically-scrolling history list, so a user can pick any slide and browse its full generation history. --- ### Requirements - Clicking anywhere on a deck row in the Decks table (`#decks-tbody tr`) should call `viewDeck(path)` (switch to Slides tab and load that deck), not `openPresentation(path)`. - The existing "eye" icon action button and context-menu "View Slides" item remain unchanged. - The slide strip in the version history panel should scroll horizontally (no wrapping). - Below the horizontal strip, the history list for the selected slide scrolls vertically. - Clicking a slide thumbnail in the strip selects it and loads its version history below. - Restore/preview actions per version card remain functionally identical. --- ### Files to Modify | File | Change | |---|---| | `crates/hero_slides_ui/static/js/dashboard.js` | Fix row click handler in `renderDecks()`; refactor version panel JS | | `crates/hero_slides_ui/static/css/dashboard.css` | Add CSS for horizontal slide strip | | `crates/hero_slides_ui/templates/index.html` | Update `#version-panel` HTML structure | No Rust server-side changes required. --- ### Implementation Plan #### Step 1 — Fix deck row click to navigate to Slides view **File:** `dashboard.js` In `renderDecks()`, change `onclick="openPresentation(...)"` to `onclick="viewDeck(...)"` on the `<tr>` element. The fullscreen presentation player remains accessible via the right-click context menu. #### Step 2 — Update version panel HTML structure **File:** `index.html` Add `#version-slide-strip` (horizontal strip) and `#version-selected-label` (slide name label) between the panel header and `#version-list`. #### Step 3 — Add CSS for horizontal slide strip **File:** `dashboard.css` Add `.version-slide-strip` (flex, no-wrap, overflow-x: auto), `.version-slide-thumb` (90×51px, selected state), `.version-slide-thumb-placeholder`, and `.version-selected-label` rules. #### Step 4 — Refactor version panel JavaScript **File:** `dashboard.js` - Add `versionSelectedSlide` module-level variable - Rewrite `openVersionPanel(slideName)` to load all slides via `deck.get` RPC and render the strip - Add `renderVersionSlideStrip(slides, selectedName)` function - Add `selectVersionSlide(name)` function - Add `loadVersionHistory(slideName)` function (extracts async fetch logic) --- ### Acceptance Criteria - [ ] Clicking a deck row switches to Slides tab and loads that deck - [ ] Fullscreen presentation still accessible via context menu - [ ] Version history panel shows horizontal non-wrapping scrollable slide strip - [ ] Slides without PNG show as labelled placeholder boxes - [ ] Initially-opened slide is highlighted in the strip - [ ] Clicking a different slide thumbnail updates the history list - [ ] Version cards render correctly in the vertical history list - [ ] Restore/preview buttons still work --- ### Notes - `deck.get` RPC already returns `slides` array with `name` and `has_png` fields — no new server code needed. - `versionSlideName` module-level variable is already used by `restoreVersion`/`previewVersion` and must remain set correctly.
Author
Owner

Test Results

  • Status: PASS
  • Total: 12
  • Passed: 12
  • Failed: 0
Full output
warning: unused variable: `spec`
  --> crates/hero_slides_examples/examples/basic_usage.rs:18:9
   |
18 |     let spec = client.rpc_discover(RpcDiscoverInput {}).await?;
   |         ^^^^ help: if this is intentional, prefix it with an underscore: `_spec`
   |
   = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default

warning: `hero_slides_examples` (example "basic_usage") generated 1 warning

warning: struct `LogBroadcast` is never constructed
  --> crates/hero_slides_ui/src/routes.rs:71:12

warning: associated items `new` and `send` are never used
  --> crates/hero_slides_ui/src/routes.rs:74:12

warning: `hero_slides_ui` (bin "hero_slides_ui" test) generated 2 warnings
    Finished `test` profile [unoptimized + debuginfo] target(s) in 11.23s

     Running unittests src/main.rs (hero_slides)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (hero_slides_sdk)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/main.rs (hero_slides_server)
running 12 tests
test parser::tests::test_extract_front_matter ... ok
test parser::tests::test_no_front_matter ... ok
test generator::tests::test_build_prompt ... ok
test generator::tests::test_build_prompt_no_intents ... ok
test generator::tests::test_build_intent_prompt ... ok
test discovery::tests::test_missing_theme ... ok
test parser::tests::test_parse_intent ... ok
test discovery::tests::test_no_intent_is_ok ... ok
test hashing::tests::test_compute_hash_consistent ... ok
test hashing::tests::test_check_theme_changed ... ok
test hashing::tests::test_metadata_roundtrip ... ok
test discovery::tests::test_find_slide_dir_files ... ok

test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

     Running unittests src/main.rs (hero_slides_ui)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests hero_slides_sdk
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
## Test Results - **Status**: PASS - **Total**: 12 - **Passed**: 12 - **Failed**: 0 <details><summary>Full output</summary> ``` warning: unused variable: `spec` --> crates/hero_slides_examples/examples/basic_usage.rs:18:9 | 18 | let spec = client.rpc_discover(RpcDiscoverInput {}).await?; | ^^^^ help: if this is intentional, prefix it with an underscore: `_spec` | = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: `hero_slides_examples` (example "basic_usage") generated 1 warning warning: struct `LogBroadcast` is never constructed --> crates/hero_slides_ui/src/routes.rs:71:12 warning: associated items `new` and `send` are never used --> crates/hero_slides_ui/src/routes.rs:74:12 warning: `hero_slides_ui` (bin "hero_slides_ui" test) generated 2 warnings Finished `test` profile [unoptimized + debuginfo] target(s) in 11.23s Running unittests src/main.rs (hero_slides) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (hero_slides_sdk) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/main.rs (hero_slides_server) running 12 tests test parser::tests::test_extract_front_matter ... ok test parser::tests::test_no_front_matter ... ok test generator::tests::test_build_prompt ... ok test generator::tests::test_build_prompt_no_intents ... ok test generator::tests::test_build_intent_prompt ... ok test discovery::tests::test_missing_theme ... ok test parser::tests::test_parse_intent ... ok test discovery::tests::test_no_intent_is_ok ... ok test hashing::tests::test_compute_hash_consistent ... ok test hashing::tests::test_check_theme_changed ... ok test hashing::tests::test_metadata_roundtrip ... ok test discovery::tests::test_find_slide_dir_files ... ok test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s Running unittests src/main.rs (hero_slides_ui) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests hero_slides_sdk running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` </details>
Author
Owner

Implementation committed: 7d0a129

Browse: 7d0a129

Changes implemented:

  • Fixed deck row click to navigate to Slides tab (viewDeck) instead of opening fullscreen presentation
  • Redesigned version history panel with horizontal slide strip + vertical history list
  • 3 files changed, 124 insertions, 6 deletions
  • All 12 tests pass ✓
Implementation committed: `7d0a129` Browse: https://forge.ourworld.tf/lhumina_code/hero_slides/commit/7d0a129 Changes implemented: - Fixed deck row click to navigate to Slides tab (`viewDeck`) instead of opening fullscreen presentation - Redesigned version history panel with horizontal slide strip + vertical history list - 3 files changed, 124 insertions, 6 deletions - All 12 tests pass ✓
Sign in to join this conversation.
No labels
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_slides#3
No description provided.