Commit Graph

67 Commits

Author SHA1 Message Date
a6bd340d81 future-plans: rich return values from templates (slots, not just strings)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:51:56 +00:00
eeb77babbb future-plans: use CodeMirror 6 for JavaScript input fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:25:55 +00:00
5681d5f024 future-plans: migrate to integer IDs via explicit safe migration tool
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:06:24 +00:00
210fb1e037 future-plans: component IDs in dropdowns, user-assignable short IDs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:04:57 +00:00
110e17e972 future-plans: sort component list by display name
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:03:53 +00:00
84dc06f365 future-plans: custom field input modes (e.g. SMD codes vs direct entry)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:55:34 +00:00
7265b5bb2c future-plans: recent locations, field keyboard shortcut, explicit save button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:50:44 +00:00
27bf6043d3 future-plans: clarify logical cell grouping is for batch overflow, not large components
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 00:24:59 +00:00
1bebf7a12b future-plans: irregular grid layouts, merged cells, stacked sub-grids
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 00:22:47 +00:00
85170d4b50 future-plans: read-only public mode via runtime flag
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 23:19:00 +00:00
94b20dda6b future-plans: grid view layers with separate source images
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:38:41 +00:00
88cc71b7d3 future-plans: custom saved search views with JS expressions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:35:04 +00:00
06b2691d87 future-plans: multi-cell grid storage selection
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:33:35 +00:00
956f168578 future-plans: auto-select uploaded file in file picker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:31:02 +00:00
07dbb6261e future-plans: store measurement as {value, prefix, unit}, canonical only for queries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:05:10 +00:00
a17bafb6d3 future-plans: clarify SI prefix vs unit distinction
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:03:33 +00:00
8cb1d11e40 future-plans: measurement dimensions and unit conversion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:02:32 +00:00
98190c5271 future-plans: parametric search, field filter, field grouping, DRY audit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:01:08 +00:00
e7653eda83 future-plans: field detail display should use a table
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 14:56:41 +00:00
51d1a23406 future-plans: add kv-store shared library and delta tracking
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 13:35:41 +00:00
31106691d4 future-plans: add file picker search filter to short-term list
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 13:33:13 +00:00
e61b6cd548 Remove accidental test files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:45:56 +00:00
4813a65a53 PDF: separate display name and filename; show filename in picker; fix rename
- Upload dialog now has distinct display name + filename fields, both pre-filled
  from the uploaded file but independently editable
- Rename in file picker shows and edits both display name and filename separately
- Filename conflict checked against both KV store and disk (via rename_no_replace)
- Display name and filename are fully independent — no longer derived from each other
- Add find_pdf_references() helper in storage.mjs for future use
- CSS: fp-name-wrap shows display name + dim monospace filename below it;
  rename mode stacks two inputs; fp-field-label for upload form labels

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:45:50 +00:00
d3df99a8f0 Fix mv-sync path; pre-fill PDF display name from filename on upload
- Fix MV_SYNC path: ../tools resolved to /workspace/tools, should be ./tools
  relative to server.mjs entry point
- Pre-populate display name input when file is selected (strips .pdf extension),
  only if the field is currently empty so manual edits are not overwritten

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:42:35 +00:00
1fbd6403ab future-plans: add field value parser chain and long-term cache note
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:37:16 +00:00
13ab5867c7 Update README and future-plans to reflect current state
README: add PDF attachments, maintenance menu, mv-sync build step,
resizable pane, URL-based navigation, word-split search, grid highlights.
future-plans: add render_field_value integrations, field types, PDF paging,
inventory/grid URL state; update state variable list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 02:54:14 +00:00
58c93f2bd0 Many UX and correctness improvements
- Components URL reflects selected component (/components/:id), survives refresh
- Word-split search: "0603 res" matches "Resistor 0603"
- Left pane resizable with localStorage persistence
- Field values rendered via central render_field_value() (units, URLs, extensible)
- Fields sorted alphabetically in both detail view and edit dialog
- Edit component dialog widened; field rows use shared grid columns (table-like)
- No space between value and unit (supports prefix suffixes like k, M, µ)
- Grid viewer highlights and scrolls to cell when navigating from component detail
- Cell inventory overlay items are <a> tags — middle-click opens in new tab
- PDF files stored with sanitized human-readable filename, not random ID
- PDF rename also renames file on disk
- Atomic rename via renameat2(RENAME_NOREPLACE) through tools/mv-sync
- Fix .cell-thumb-link → .cell-thumb-preview (div, not anchor), cursor: zoom-in
- Fix field name overflow in detail view (auto column width, overflow-wrap)
- Fix link color: use --accent instead of browser default dark blue

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 02:49:11 +00:00
7ef5bb5381 Render URL-like field values as clickable links in component detail
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:29:55 +00:00
08b8e2dd4d Replace goto-grid button with clickable grid cell label in component detail
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:29:08 +00:00
d489c1e306 Inventory view: click component name to navigate to component detail
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:27:11 +00:00
bc339bd073 Right-align grid cell index, count stays left
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:25:27 +00:00
ad96a53246 Grid cell label: left-align, count left of index
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:24:21 +00:00
258f9b6491 Fix grid cell label and count: label below image, count as green text beside it
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:23:27 +00:00
e1c517c023 Grid viewer: improve cell labels and add green inventory count badge
Labels now overlay image with gradient background and visible colour.
Green badge top-right shows number of inventory entries for that cell.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:22:05 +00:00
8fa4a54f9e Widen inventory dialog; fix grid picker cell size to 64px with scroll
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:20:17 +00:00
64af0862f2 Replace row/col number inputs with graphical grid cell picker
Click a cell in the visual grid to select it. Cell images shown where
available. Selected cell highlighted with accent border.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:16:40 +00:00
488fa7ff53 Fix inventory dialog: hidden form-row not hiding due to display:flex override
Also clarify notes label as per-location, not per-component.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:13:47 +00:00
4a210047c8 Fix formatter in inventory component selector; add Duplicate button
- Inventory dialog now uses component_display_name() not c.name
- Duplicate copies name/description/fields and immediately opens edit dialog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:11:11 +00:00
1d3a157d75 Add lightbox for all preview images (component, grid cell, PDF thumbs)
Click any thumbnail to open full-size in overlay. Click backdrop or
press Escape to close. PDF thumbs now clickable too.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 00:45:10 +00:00
cdefa70bd7 Match PDF thumb height to grid cell preview (128px)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 00:42:35 +00:00
8e0f7eb4d8 Add maintenance menu (top-right ⚙) with generate missing PDF thumbnails
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 00:41:40 +00:00
451b04ad03 Add PDF first-page thumbnails via pdftoppm
Generated at upload time, stored alongside the PDF in data/pdfs/.
Shown in the file picker (48px) and component detail view (80px).
Gracefully skipped if pdftoppm is unavailable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 00:40:43 +00:00
61d52d8076 Move file linking to component detail view, consistent with images
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 00:24:35 +00:00
f0bedc80a7 Add PDF file attachments to components
- Upload PDFs, rename them (conflict-checked), delete them
- Link/unlink files per component (many components can share a file)
- File picker dialog: browse existing files, rename inline, upload new
- Component detail shows linked files as clickable links
- Files stored in data/pdfs/, served at /pdf/:filename
- KV prefix: pdf:

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 00:19:30 +00:00
e91a656dc8 Fix grid horizontal scroll: remove overflow-x:hidden from body
body was silently clipping all horizontal overflow. min-width:0 on
#main prevents flex child from expanding beyond container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 01:28:46 +00:00
dc0e822e9b Fix horizontal scroll in grid viewer: overflow-x on #main not body
body had overflow-x: hidden which ate the scrollbar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 01:25:19 +00:00
b9ba6d38b5 Fix grid viewer zoom: fixed cell px size + overflow-x scroll
Cells are sized in CSS px to fit at load time. Browser zoom now scales
everything uniformly; grid scrolls horizontally instead of reflowing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 01:22:55 +00:00
754f8504f1 Remove grid viewer zoom slider — browser zoom is sufficient
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 01:15:52 +00:00
faed2f8296 Fix grid viewer zoom: use CSS zoom so images and text scale together
Cells stay 1fr (always fill width), CSS zoom shrinks the whole grid
uniformly. No overflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 01:15:05 +00:00
878b32f9e5 Add zoom/cell-size slider to grid viewer
Images and labels scale together with a range slider (40–300px).
Grid scrolls horizontally when cells exceed viewport width.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 01:08:25 +00:00