put a context/background folder per deck #13
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_slides#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
at left side
is the background folder only
let users
accept pdf and .md only
this will manage the context as used for creating slides
Implementation Spec for Issue #13: Per-Deck Background/Context Folder Panel
Objective
Add a left-side panel to the Slides tab that lets users browse, upload, and manage background/context files (
.mdand.pdf) organized in per-deck subfolders under<deck_path>/content/background/. These files provide contextual information for AI slide generation.Current State
The system already has:
content/background/<subfolder>/*.mdfile structurefind_background_folders()andread_background_content()in discovery moduledeck.listBackgroundanddeck.readBackgroundRPC methodsWhat is missing:
.pdffile handling in background content (only.md)Requirements
content/background/with folders and files.mdand.pdfonlyImplementation Plan (5 Steps)
Step 1: Extend hero_slides_lib — Add
BackgroundFilestruct, PDF text extraction, folder CRUD functions, file save/read/delete/move operationsStep 2: Add RPC handlers — New
bg.*methods:listFiles,createFolder,deleteFolder,deleteFile,moveFile,uploadFile,readFileStep 3: Background panel UI (HTML + CSS) — Left-side collapsible panel with tree view, drop zone, action buttons
Step 4: Background panel JavaScript — Tree rendering, folder CRUD, file upload (drag-drop + picker), file preview, file move
Step 5: OpenRPC spec & tests — Update spec, add unit tests for library functions
Acceptance Criteria
.mdand.pdffiles (picker + drag-and-drop).md/.pdffilesTest Results
Project compiles cleanly. All existing tests pass after changes.
Implementation Summary
Files Modified
Library (
hero_slides_lib)src/types.rs— AddedBackgroundFilestructsrc/discovery.rs— Extended to count/read.pdffiles; addedfind_background_files()function; PDF text extraction viapdf-extractsrc/deck.rs— Added 7 new functions:deck_list_background_files,deck_create_background_folder,deck_delete_background_folder,deck_delete_background_file,deck_move_background_file,deck_save_background_file,deck_read_background_filesrc/lib.rs— Re-exported all new types and functionsCargo.toml— Addedpdf-extract = "0.8"dependencyServer (
hero_slides_server)src/rpc.rs— Added 8 new JSON-RPC methods:bg.listFolders,bg.listFiles,bg.createFolder,bg.deleteFolder,bg.deleteFile,bg.moveFile,bg.uploadFile(base64),bg.readFileUI (
hero_slides_ui)templates/index.html— Added left-side background panel with two-column layout in Slides tabstatic/css/dashboard.css— Added all panel styles (tree view, drop zones, file rows, folder rows)static/js/dashboard.js— Added full panel logic: folder CRUD, file upload (picker + drag-and-drop), file preview, file move between folders, panel collapse/expandTest Results
Notes
.mdand.pdffiles accepted (validated server-side)Implementation committed:
e7ee4d5Browse:
e7ee4d5