New top-level nav section showing all source images in a list view
with checkboxes to edit the uses array (grid, bin) per image. Allows
correcting wrongly-tagged images without code changes.
Server PUT /api/source-images/:id was already in place; re-added the
frontend API wrapper that was prematurely removed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removing toggle interactivity from use badges — they were confusing
and the wrong place to manage uses. The uses array is now managed
automatically by upload context. Badges are plain spans.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bins section now mirrors the grids section with two tabs:
- Bins: gallery of processed bin records
- Sources: source images tagged with uses=['bin'], with upload and
'+ Bin' button to create a bin record from an existing source image
Server: POST /api/bins/from-source accepts source_id, creates bin
record and adds 'bin' to the source image's uses array.
URL state: /bins → bins tab, /bins/sources → sources tab.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Inactive badges (uses not present on a source image) are now hidden
rather than shown at low opacity, which was visually noisy and
confusing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- lib/storage.mjs: bin CRUD with bin: prefix
- lib/grid-image.mjs: compute_bin_size() capped at 1024px
- server.mjs: POST/GET/PUT/DELETE /api/bins routes; PUT /api/bins/:id/corners
re-processes image via process_grid_image with rows=1 cols=1
- public/lib/api.mjs: bin API wrappers including upload_bin()
- public/index.html: Bins nav button
- public/templates.html: t-section-bins, t-bin-card, t-dialog-bin-editor
- public/app.mjs: render_bins(), open_bin_editor() using Grid_Setup,
save/cancel wiring in init()
- public/style.css: bin gallery and card styles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace check-then-read with read-and-catch-ENOENT. The existsSync
pattern is redundant and slightly misleading; other errors still
propagate.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drag indices 4-7 correspond to top/right/bottom/left edge midpoints.
Dragging a midpoint applies the delta to both adjacent corners, making
it easier to align bins with rounded corners where corner handles may
be obscured.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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>
- 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>
- 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>
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>