Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ see the notices in the README.

### Added

- **BOM components picked by search** (#419, UX B5 of #408): *Add component*
on the web BOM card lists matching items as you type part of their number,
name or file name – with the preview image from the CAD file, latest
revision, state, project group and the file name that matched; ↑/↓, Enter
and Esc work, and without JavaScript the field still takes the exact item
number. The desktop app's *Structure* tab gets *Add line…* with the same
picker, an editable quantity and *Remove* on every first-level line of an
own check-out. New routes: `GET /items/suggest` (web session) and
`GET /api/v1/items/suggest`; both use the item search with the user's read
rights, so items of restricted groups the user is not in never appear (at
most 10 rows, nothing for fewer than 2 characters).
- **Request ids** (#381): every answer of the server carries an
`x-request-id` header (a new UUID, or a reverse proxy's own id of 1–64
characters `[A-Za-z0-9-]`), the request's log line records it as
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ end-to-end tests against a real PostgreSQL.
**Structure**

- **Multi-level BOM** – mass and cost roll-up, revision rules, comparison of
two revisions, CSV/Excel export.
two revisions, CSV/Excel export; components are picked by searching their
number, name or file name (web and desktop).
- **Mass properties** – mass, centre of gravity and inertia tensor of a whole
assembly or vehicle from the exported meshes of its parts, a material
library of densities and measured masses of bought parts; CSV/JSON export.
Expand Down
3 changes: 2 additions & 1 deletion desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TeamCraft server – it is a client, not an offline copy.
| Right-click menu | On items and files in the navigator, Home *Files* / *All items* / *Structure*, the worklist's check-outs and the Graph cards (rows with `data-item` + `data-rev`, one listener in `js/item-menu.js`): *Check out and open* / *Open in CAD*, *Check out*, *Check in…*, *Get…*, *Show in folder*, *Copy number*, *Where used*, *Request change…*, *Open in browser*; the entries and the tooltip of a disabled one come from the toolbar's rules (`js/item-menu-rules.js`, tested by `scripts/desktop-item-menu.test.mjs`); Shift+F10 / context-menu key, arrows, `Esc` – #417 |
| Toolbar | Below the tab strip, acting on the active tab: grouped buttons that keep their place (revision: Lock · Work · Lifecycle · Collaborate; change: Review · Lifecycle · Collaborate; request: Triage · Requester · Collaborate), the **next step highlighted** (*Check out*, *Check in…* with local changes, *Release…* on a clean check-out, *Revise* when released, *Submit for review* / *Approve change* on a change), greyed-out buttons with a tooltip saying why (*Check in…* has an upload arrow, never the download arrow of *Get…*, #409; *Edit attributes* as in the web UI, #410), rare actions (*Pack and Go…*, *Open in browser*, *Refresh*, *Mark obsolete…*) in **More ▾** – keyboard: `Enter`/`Space`/`↓` open, arrows move, `Esc` closes |
| Tab order | Drag a tab to move it (pointer events, an insertion bar shows the landing place, the strip scrolls at its edges, `Esc` cancels; a plain click still activates, a dragged tab keeps its state and is not activated). Keyboard: arrow keys, `Home`, `End` move the focus between the tabs (WAI-ARIA tabs, roving tabindex, `Enter`/`Space` activates), `Ctrl+Shift+PageUp/PageDown` move the active tab. Right click (or the menu key): *Move to start*, *Move to end*, *Close*, *Close others*, *Close tabs to the right*. The order is kept while the app runs (open tabs are not restored on start). Rules in `ui/js/tab-order.js`, tested by `scripts/desktop-tab-order.test.mjs` (`node`); the dragging itself is checked by hand |
| Revision tabs | Overview (with *At a glance*: the preview image from the CAD file, files, BOM lines, where used, references, change orders, open requests – and a link to the similar parts in the browser), Files (versions, restore, open), Structure (multi-level BOM, revision rules, roll-up), Where used, References, **Graph** (see below), Changes, History, **3D viewer** (STEP, meshes, point clouds – converted by the server), Workspace |
| Revision tabs | Overview (with *At a glance*: the preview image from the CAD file, files, BOM lines, where used, references, change orders, open requests – and a link to the similar parts in the browser), Files (versions, restore, open), Structure (multi-level BOM, revision rules, roll-up; under your check-out *Add line…*, quantities and *Remove*), Where used, References, **Graph** (see below), Changes, History, **3D viewer** (STEP, meshes, point clouds – converted by the server), Workspace |
| Graph | A navigable reference/BOM graph around the revision: the focused item in the middle, its BOM children and references below, the assemblies that use it above. Node **colour** = lifecycle state, **size** and the ⚙ badge = the item's own BOM complexity, **×n in the top-left corner** = how many instances of that part or sub-assembly the assembly contains (summed over its BOM lines, ×1 included). Every node is clickable and takes the tab to that item – a sub-assembly shows its own graph, anything else its overview, the item in the middle its own overview – with a **back control that stays in the same place** (the left of the sub-tab row) and leads back the way you came, one step per click; `Ctrl`/`⌘`+click opens a node in a tab of its own. Mouse-wheel zooms on the cursor; drag to pan; the view fits itself while details load until you zoom or pan, a double-click on the background fits it again. More than 8 neighbours on one side are laid out in rows; above 48 only the first 48 are fetched for preview and complexity (one request each), the rest keep a basic card. Preview images and filenames on the nodes; pure SVG, no external engine |
| Working folder | One folder per project group that **mirrors the folder structure of the files** (`<workspace>/<group>/<folder>/<file>`, the folder is stored with every file on the server), one copy of each file – the revision is metadata in `<workspace>/.teamcraft/state.json` (item, revision, file id, version, SHA-256, checked out). Files you have not checked out are **read-only** on disk; *Check out* takes the lock and makes them writable; *Check in…* uploads the chosen files as new versions, releases the lock in one step and makes them read-only again (files above 32 MiB go first as chunked, resumable uploads, then join the same check-in transaction). The check-in dialog shows the progress, and **Cancel** stops the check-in until its last byte is sent – before the next STEP export, between two chunks (the upload sessions are discarded, `DELETE /uploads/{id}`) or half-way through the streamed request with the small files: nothing is stored, the revision stays checked out (`src/abortable.rs`). Every check-in names the version each file is based on, so the server refuses (409) to overwrite a version somebody else checked in meanwhile. The Workspace tab shows *up to date* / *modified* / *outdated* / *conflict* / *new* / *missing* / *name clash* per file (from the server's file status) with its path, read-only flag and the lock owner. Two items with the same folder and file name are reported, never overwritten. Lock and backup files of the CAD programs are skipped; a SolidCraft design that is open in SolidCraft (a fresh `.~<file>.lock` beside it, `src/cadlock.rs`) is marked *Open in SolidCraft* with the computer and user, and the check-in dialog warns that unsaved changes there are not checked in; Creo iterations count as one file. A tracked revision the server no longer shows (you left a restricted project group) is listed as *No longer accessible*: its local copies stay untouched and are never synced again – delete them yourself if you must In *Check in…*, a new part or assembly file next to a revision that has a model already is offered unticked, with *New item from this file* (#359) |
| Get | *Get…* on a revision: the item with its BOM (revision rule *latest* or *released*) and the parts its CAD files reference, resolved by the server (`…/workset`); only missing and outdated files are downloaded (SHA-256, checked after the download), recorded one by one so an interrupted Get continues where it stopped – also inside a large file: the bytes received stay in `<name>.<sha>.teamcraft-download` and the next Get asks only for the rest (`Range` / `If-Range`, `src/resume.rs`), checks the SHA-256 of the whole file and renames it into place; progress and *Cancel* in the status bar. No browser downloads |
Expand All @@ -47,6 +47,7 @@ TeamCraft server – it is a client, not an offline copy.
| New on this computer | Worklist section (#359, editors): the parts and assemblies in the working folder that belong to no item yet, one suggestion per model file with its drawing and exports of the same name in the same folder, newest first, counted on the rail. A click opens *New* prefilled, *Create items…* creates the ticked ones after a summary of what is created and what is refused, *×* ignores a file (`.teamcraft/ignored.json`, *Show ignored*; entries of files that are gone are dropped after a complete scan). The scan (`desktop/src/newfiles.rs`, `new_files_scan`) skips tracked and added files, companions of tracked files, lock/backup/temporary files, `OldVersions` and hidden folders; at most 50 000 entries and 2 000 files per scan, run when the worklist opens or the window gets the focus back (at most every 15 s). Nothing is uploaded without the dialog or the summary |
| App version | The version of the app above the logo at the bottom of the rail, always visible (#357) |
| Import BOM | *Import BOM…* in the *Structure* tab (and the *More* menu) of a revision you have checked out, *Tools → Import BOM as New Assembly…* for a new one: a BOM exported by the CAD program (CSV, TSV, Excel, ODS or a STEP assembly, chosen in the native dialog) goes to the server's BOM import as a dry run first – the dialog shows the counts of lines, new and existing items, the notes and the first lines – and *Import* creates the lines and missing items in one transaction (numbers from the file or the group's numbering scheme, reuse of existing items optional) |
| BOM lines | *Add line…* in the *Structure* tab of a revision you have checked out (`js/bom-lines.js`, #419): a component picker searches number, name and file name (`GET /items/suggest`, older servers `GET /items?q=`; preview image, revision, state, group; ↑/↓ + Enter, Esc closes the list), then quantity, find number and notes (`POST /items/{n}/revisions/{c}/bom`); under the own check-out every first-level line has an editable quantity (`PATCH /bom-lines/{id}`) and *Remove* (`DELETE /bom-lines/{id}`, confirmed); the tab reloads after each change |
| Release and changes | *Release…* creates and submits a change order – with the unreleased dependencies (BOM children, drawings) by default; the own user name is refused as reviewer, with nobody else in the group it creates a draft, and a refused revision or reviewer cancels the half-made draft again (#291); *Release readiness* panel with *Add all*; on a draft *Add reviewer* by user name, *Remove* and *Cancel change*, *Submit for review* disabled with the reason while a revision or reviewer is missing; approve/reject from the worklist |
| Change requests | *Request change…* on a revision tab and *Request…* on a file (Files and Workspace tabs) raise a change request prefilled with item, revision and file name, with an optional screenshot or PDF (native file dialog, uploaded by the Rust side); request tabs with discussion, decision (accept / defer / reject), *Create change order*, attachments; *Requests assigned to me* and *My open requests* in the worklist |
| Change propagation | *Dependents to check* grouped by dependent revision (one worklist line with a count, expandable; on the home page **Open**, **Revise**, **Acknowledge all…** per dependent and **Acknowledge…** per change), *Check needed* on the revision tab, references, *As released* rule, impact analysis |
Expand Down
11 changes: 11 additions & 0 deletions desktop/ui/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1344,3 +1344,14 @@ pre.release-notes {

/* right-click menu of an item (#417, item-menu.js): busy while its revision loads */
body.menu-loading, body.menu-loading * { cursor: progress; }

/* Structure tab: Add line… component picker and editable BOM lines (#419, js/bom-lines.js) */
.picker-list { list-style: none; margin: 4px 0 0; padding: 4px 0; max-height: 18rem; overflow-y: auto;
border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface); }
.picker-list:empty { display: none; }
.picker-option { display: flex; gap: 8px; align-items: center; padding: 4px 8px; cursor: pointer; }
.picker-option:hover, .picker-option[aria-selected="true"] { background: var(--selected); }
.picker-thumb { flex: none; width: 36px; height: 36px; object-fit: contain; border-radius: var(--radius-xs); background: var(--surface-sunken); }
.picker-main { display: flex; flex-direction: column; min-width: 0; }
.picker-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td input.qty { width: 6.5em; text-align: right; }
Loading
Loading