Repository navigation
Pick BOM components by search in web and desktop (#419) - #444
Merged
Merged
Conversation
The web *Add component* field lists matching items while typing part of their number, name or file name (thumbnail, revision, state, group, matched file; keyboard and ARIA combobox), progressive enhancement over the exact number field. New GET /items/suggest (session) and GET /api/v1/items/suggest over items::suggest, i.e. the item search with the caller's read rights. Desktop Structure tab: Add line... with the same picker, editable quantity and Remove on first-level lines of an own check-out. Tests for name and file-name matches, restricted groups, sign-in and the check-out rule; docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- test: release the author's automatic check-out before the "not checked out" case, so the refusal is really exercised - desktop: drop a stale choice on typing, Esc closes only the suggestions, aria-activedescendant and a live status line - web: a late answer after blur no longer reopens the list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sebagrei
marked this pull request as ready for review
November 22, 2026 20:50
added 2 commits
November 22, 2026 21:53
…nent-picker # Conflicts: # CHANGELOG.md # docs/OPEN_WORK.md # src/services/similar.rs
…nent-picker # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #419
What changed
items::suggest(src/services/items.rs) – the existing item search (number, name, description, attributes, file name) with the caller's actor, soaccess::item_visiblehides restricted groups; at most 10 rows, nothing below 2 characters, text cut at 200; a thumbnail file per row (similar::thumbnails, nowpub(crate)).GET /items/suggest?q=&limit=(session cookie,no-store) returns JSON incl.thumbnail_url. The Add component field on the BOM card keeps itschildinput (works without JS) and getsdata-suggest+ ARIA combobox/listbox attributes;static/app.jsadds a debounced picker (DOM APIs only, no innerHTML; ↑/↓, Enter, Esc); styles instatic/style.css. No inline JS/CSS.GET /api/v1/items/suggest?q=&limit=(same service; listed in the API index anddocs/src/reference/api.md).desktop/ui/js/bom-lines.js– Add line… in the Structure tab of an own check-out (picker over/items/suggest, falls back to/items?q=on older servers; qty, find no., notes →POST …/bom), editable quantity (PATCH /bom-lines/{id}) and Remove (DELETE, confirmed) on first-level lines; the tab reloads after each change.tests/component_picker.rs– name / file name / number matches and the 10-row cap; restricted-group items never suggested (web and API); unauthenticated and bearer-on-web requests refused; adding a line without the own check-out refused through the web form and the API.docs/src/guide/structure.md,docs/src/guide/desktop.md,desktop/README.md,docs/src/reference/api.md,docs/src/dev/threat-model.md,docs/OPEN_WORK.md.How it was tested
Not compiled or run locally (no builds on this machine); only
cargo fmt --allwas run.nodewas not available here, so the JS was not syntax-checked locally either – CI (ci.yml,desktop.ymlui job incl.check-desktop-modules.mjs) verifies.Checklist
knowledge), or openly licensed material under a compatible licence
that is credited. It contains no code decompiled, disassembled or
rewritten from proprietary software and no leaked code
(CONTRIBUTING.md).
CHANGELOG.md,README.md,docs/src/**,docs/OPEN_WORK.mdwhere it applies).cargo fmt --all --check,cargo clippy --all-targets -- -D warningsand
cargo testpass locally, or CI runs them. (fmt done locally; clippy and tests left to CI)🤖 Generated with Claude Code