feat: parsEO dashboard with clickable chip-tree filename builder - #73
feat: parsEO dashboard with clickable chip-tree filename builder#73MatMatt wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40342bb1c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ## Usage | ||
|
|
||
| Open `dashboard.html` in a browser. Set the API URL to `http://nucleus:8000` (or the host where the API runs). |
There was a problem hiding this comment.
Provide a usable API connection for direct-file usage
Following this only documented launch path opens the dashboard with a file:// origin, but dashboard.html unconditionally fetches the relative URL /api/health and no longer contains the API URL input referenced here. Consequently, users cannot connect to http://nucleus:8000 or another API host as instructed; either document and provide same-origin HTTP serving or restore a configurable API URL.
Useful? React with 👍 / 👎.
| // Fetch helper that checks response.ok before parsing JSON | ||
| function apiJSON(url, opts) { | ||
| return fetch(url, opts).then(r => { | ||
| if (!r.ok) return r.json().then(d => Promise.reject(d.detail || r.statusText)); |
There was a problem hiding this comment.
Reject API failures as Error objects
Whenever a non-2xx FastAPI response contains detail, this rejects with a string, array, or object rather than an Error, while all callers render e.message. In common cases such as incomplete assembly fields returning 4xx validation details, the dashboard therefore displays Error: undefined instead of the actionable server message; wrap the normalized detail in an Error or make callers render the rejection value directly.
Useful? React with 👍 / 👎.
| apiJSON(API_BASE + '/api/families/' + encodeURIComponent(family) + '/versions') | ||
| .then(d => { |
There was a problem hiding this comment.
Discard stale family-version responses
If a user selects two families before the first /versions request completes, the earlier response can arrive last and unconditionally replace the version list for the currently selected family. Its subsequent selectVersion call then combines the stale version with the newer global currentFamily, potentially loading a nonexistent or mismatched schema; guard the callback against family !== currentFamily or cancel the previous request.
Useful? React with 👍 / 👎.
Summary
Adds the parsEO dashboard to CLMS_documents — a filename builder tool with:
Features
Architecture
Files