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
2 changes: 1 addition & 1 deletion .claude/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"runtimeExecutable": "cmd",
"runtimeArgs": [
"/c",
"set CSC_PUBLIC_API_URL=http://127.0.0.1:8791&& scripts\\dev\\run_csc_python.cmd -u scripts/dev/serve_dump.py --dump latest --assets .dev/assets-261012 --port 8791 --mongo-port 27791"
"set CSC_PUBLIC_API_URL=http://127.0.0.1:8791&& scripts\\dev\\run_csc_python.cmd -u scripts/dev/serve_dump.py --dump latest --assets .dev/assets --port 8791 --mongo-port 27791"
],
"port": 8791
},
Expand Down
6 changes: 3 additions & 3 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Catalog of Second Chances (CSC) - Digital Database and Corresponding Interfaces for ReUse of Architectural Components (v0.6.4.4)",
"version": "0.6.4.4",
"title": "Catalog of Second Chances (CSC) - Digital Database and Corresponding Interfaces for ReUse of Architectural Components (v0.6.4.5)",
"version": "0.6.4.5",
"upload_type": "software",
"description": "<p>The <em>Catalog of Second Chances (CSC)</em> is a prototypical digital component database. It catalogs digital representations of uniquely identifiable architectural components for reuse. Furthermore, it provides corresponding interfaces and tools to leverage them via a backend REST-API, a web-frontend as well as a interface for direct interaction within Rhino Grasshopper.</p><h2>Changes in v0.6.4.4 (2026-11-03)</h2><p>Grasshopper hardening, and the beta notice takes its version from the release. Run <code>CSC_Update</code> in Grasshopper after the server is deployed.</p><h3>Fixed</h3><ul><li><strong>Grasshopper, missing inputs:</strong> a component with a missing or empty input shows a warning and waits for data, instead of an error. Real failures (bad counts, unreadable data, server errors) stay errors (#32, #40).</li><li><strong>Grasshopper, outputs without a result:</strong> an output with nothing to give is an empty Grasshopper tree, not <code>&lt;empty&gt;</code> or <code>&lt;null&gt;</code>, on every error path and when a component stops early. In a component that runs once per item, one missing, empty or failed item gives a null in its slot, so the outputs stay one to one with the input list; an input with no data at all gives empty outputs (#33, #40).</li><li>**Grasshopper, <code>ReadFromD2P</code>:** the <code>Component</code> output carries the D2P component itself, and a remark names its type. When the D2P component of an element cannot be resolved, a warning names the element; a plain tag of <code>BakeComponents</code> stays null without a warning (#36).</li><li><strong>Beta notice:</strong> the beta banner and the beta login notice take the version from the release. The text in the frontend settings writes <code>{version}</code> where the number goes (#52).</li></ul><h3>Changed</h3><ul><li><strong>Grasshopper, wording:</strong> the descriptions and messages of the components call a single building component an \"element\" instead of a \"piece\", as the web app does since 0.6.4.2.</li><li><strong>Grasshopper, frames:</strong> the description of <code>ApplyFrame</code> says that its <code>Frame</code> output is the frame used, in the stored coordinates, and points to <code>DisassembleComponent</code> for the frame where the moved element sits. The <code>Frame</code> and <code>BoundingBox</code> descriptions of <code>DisassembleComponent</code> now say that they give the element where it sits.</li><li>**Grasshopper, <code>ReinforcementLayout</code>:** the steel grade (<code>Spec</code>) is optional; bars without it are stored without a grade.</li><li>**Grasshopper, <code>AddEvidence</code>:** an invalid identity id or evidence text is an error, no longer a warning.</li><li>**Grasshopper, <code>CSC_Update</code>:** after it replaces the source of a component, the remark and the end of the run ask you to save the definition, close it and open it again before clicking Apply: until then Rhino 8 opens the script editor of that component read-only and the component reports \"Object reference not set to an instance of an object\".</li><li><strong>Grasshopper library:</strong> <code>csc_gh</code> 261102; <code>CSC_Update</code> brings it.</li><li><strong>Component map:</strong> the layout now starts from a PCA initialisation instead of the spectral one, which failed on groups of near-identical elements and fell back to a random start. All positions on the map shift once with the first nightly run after the release.</li><li><strong>Development:</strong> the development requirements are pinned exactly (pytest 9.1.1, pytest-xdist 3.8.0, coverage 7.16.2, flake8 7.4.1, invoke 3.0.3, requests 2.34.2, pyld 3.3.0, rdflib 7.6.0), and CI installs the same pytest. A cancelled sign-in in the Grasshopper tests no longer leaves an exception in a thread.</li></ul><h3>Server notes</h3><ul><li>In the server's frontend <code>.env</code>, take the version number out of <code>BETA_BANNER_TEXT</code> and <code>BETA_LOGIN_MESSAGE</code>, or write <code>{version}</code> in its place (for example <code>BETA_BANNER_TEXT=&quot;VERSION {version}&quot;</code>). Restart the frontend.</li></ul><p>Full history: <a href=\"https://github.com/digitaldesignunit/csc/blob/v0.6.4.4/CHANGELOG.md\">CHANGELOG.md</a></p>",
"description": "<p>The <em>Catalog of Second Chances (CSC)</em> is a prototypical digital component database. It catalogs digital representations of uniquely identifiable architectural components for reuse. Furthermore, it provides corresponding interfaces and tools to leverage them via a backend REST-API, a web-frontend as well as a interface for direct interaction within Rhino Grasshopper.</p><h2>Changes in v0.6.4.5 (2026-11-08)</h2><p>The web controls follow the permission rules, and a component can move to another dataset. No Grasshopper change: <code>CSC_Update</code> is not needed for this release.</p><h3>Added</h3><ul><li><strong>Move a component to another dataset:</strong> <code>POST /identities/{id}/move</code> and a control in the actions menu of the component, for a moderator of both datasets. One component at a time. A dataset emptied this way can be deleted. Until the nightly run the map may colour a moved component by its old dataset; who sees it is decided at read time (#50).</li><li><strong>Delete a never-published component:</strong> a control with a confirm dialog, for its creator or a moderator (#50).</li><li><strong>API, open snapshots and corrections:</strong> an identity carries <code>has_open_snapshot</code> and an evidence record <code>has_open_correction</code>, for contributors and moderators of the dataset and admins. Only the fact, no details (#47).</li><li><strong>API, lists of snapshots:</strong> <code>GET /snapshots/pending</code> and <code>GET /snapshots?mine=1</code> carry <code>identity_withdrawn</code>, so the moderation queue and My work hide Publish and Submit there (#49).</li></ul><h3>Changed</h3><ul><li><strong>Behaviour, a withdrawn component stays out of circulation:</strong> reserve, re-enter, undo exit and undo deinstall answer 409 on a withdrawn component. So does adding a photo to a withdrawn snapshot or to any snapshot of a withdrawn component, and adding an attachment to a withdrawn record or to any record of a withdrawn component, and correcting a snapshot of a withdrawn component, and submitting, publishing, promoting or reinstating one, and reinstating an evidence record of it, and withdrawing a snapshot with <code>replacement_id</code>. Recall, reject, back to draft and delete stay, so that an open snapshot can be cleared. A moderator reinstates the component first (#49).</li><li><strong>Behaviour, revoking an invitation:</strong> only a moderator of the dataset, or an admin, revokes an invitation. The creator loses the right with the role (#48).</li><li><strong>Web, controls the backend allows:</strong> a moderator adds an attachment to a published record, and edits the name, notes and date of a withdrawn snapshot, the rest of the form stays disabled there; a contributor reaches their own draft snapshot from the snapshot dialog; a new state, evidence and \"out of circulation\" stay available when every snapshot is withdrawn; a site admin submits, recalls and returns to draft another person's record; an author edits their evidence draft after losing the contributor role; the layout document of a superseded record can be filled in (#48).</li><li><strong>Web and backend, wording:</strong> user text says \"component\" for a catalogued component again, also in error messages, the Data Model page and the MCP tool descriptions. 0.6.4.2 had brought in \"element\", which left the web mixing both words; \"element\" stays only for the items of a batch. A recorded state is a \"snapshot\", as in the data model, where the web said \"version\" in most places; \"v1\" stays its number.</li><li><strong>MCP, names:</strong> the tools <code>list_versions</code> and <code>get_version</code> are now <code>list_snapshots</code> and <code>get_snapshot</code>; the parameter <code>version_id</code> is <code>snapshot_id</code>, and the answers say <code>snapshots</code>, <code>current_snapshot</code> and <code>snapshot_count</code>. A chat that calls an old name gets \"tool not found\" once and then sees the new list.</li><li><strong>Web, page description:</strong> the description search engines and link previews show reads \"A digital database for reclaimed architectural components.\"</li><li><strong>Backend, index:</strong> <code>component_snapshots</code> gains an index on <code>identity_id</code> and <code>status</code>, for the check of an open snapshot. It is built when the server starts.</li></ul><h3>Fixed</h3><ul><li><strong>Web, controls that ended in a refusal:</strong> controls the backend would refuse with a 403 or a 409 are hidden, or disabled with the reason, before a form is filled in (#46, #47).</li><li><strong>Web, claims:</strong> a claim with a result saves. The form sent no <code>summary.kind</code>, so the server answered 422 although the form said nothing was missing.</li><li><strong>Tests:</strong> <code>test_signin.py</code> passes on Python 3.9.</li><li><strong>Backup:</strong> <code>pull_production.ps1</code> passes SSH keepalive options, after a pull of the assets broke at 1.56 GB.</li></ul><p>Full history: <a href=\"https://github.com/digitaldesignunit/csc/blob/v0.6.4.5/CHANGELOG.md\">CHANGELOG.md</a></p>",
"creators": [
{
"name": "Eschenbach, Max Benjamin",
Expand Down
14 changes: 14 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

Guidance for coding agents working in this repository.

## Standing rules

- The maintainer makes every commit, push and production step. Do not stage, commit, push or run anything against
production; leave changes in the working tree and give the commands. Commit messages stay inline in the command.
- ASCII only in code and scripts, no emoji. In docs, write dashes as `--` and `---`. Icons come from `lucide-react`.
- No names of people or accounts in committed files; refer to roles. The legal pages and the author line of the
Grasshopper user objects are the exceptions.
- Packages must be about two weeks old: no dependency, action or lockfile entry younger than about 14 days.
- In user-facing text a catalogued building component is a "component" (on the Grasshopper page the other kind is a
"Grasshopper component"); "element" is only an item of a batch. A recorded state is a "snapshot"; "v1" is its number.
- Several docs and sources use CRLF. Keep the line ending of the file you edit.
- The root `README.md` states rules plainly, without decision references. Those belong in `docs/adr/`.
- The decision log `docs/adr/DESIGN_DECISIONS.md` is append-only: amend a row with an "Amended ..." sentence.

## Agent skills

### Issue tracker
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,61 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.4.5] - 2026-11-08

The web controls follow the permission rules, and a component can move to another dataset. No Grasshopper
change: `CSC_Update` is not needed for this release.

### Added

- **Move a component to another dataset:** `POST /identities/{id}/move` and a control in the actions menu of
the component, for a moderator of both datasets. One component at a time. A dataset emptied this way can be
deleted. Until the nightly run the map may colour a moved component by its old dataset; who sees it is decided
at read time (#50).
- **Delete a never-published component:** a control with a confirm dialog, for its creator or a moderator (#50).
- **API, open snapshots and corrections:** an identity carries `has_open_snapshot` and an evidence record
`has_open_correction`, for contributors and moderators of the dataset and admins. Only the fact, no details (#47).
- **API, lists of snapshots:** `GET /snapshots/pending` and `GET /snapshots?mine=1` carry `identity_withdrawn`, so
the moderation queue and My work hide Publish and Submit there (#49).

### Changed

- **Behaviour, a withdrawn component stays out of circulation:** reserve, re-enter, undo exit and undo deinstall
answer 409 on a withdrawn component. So does adding a photo to a withdrawn snapshot or to any snapshot of a
withdrawn component, and adding an attachment to a withdrawn record or to any record of a withdrawn
component, and correcting a snapshot of a withdrawn component, and submitting, publishing, promoting or
reinstating one, and reinstating an evidence record of it, and withdrawing a snapshot with `replacement_id`.
Recall, reject, back to draft and delete stay, so that an open snapshot can be cleared. A moderator reinstates the
component first (#49).
- **Behaviour, revoking an invitation:** only a moderator of the dataset, or an admin, revokes an invitation.
The creator loses the right with the role (#48).
- **Web, controls the backend allows:** a moderator adds an attachment to a published record, and edits the
name, notes and date of a withdrawn snapshot, the rest of the form stays disabled there; a contributor reaches
their own draft snapshot from the snapshot dialog; a new state, evidence and "out of circulation" stay available
when every snapshot is withdrawn; a site admin submits, recalls and returns to draft another person's record; an
author edits their evidence draft after losing the contributor role; the layout document of a superseded
record can be filled in (#48).
- **Web and backend, wording:** user text says "component" for a catalogued component again, also in error
messages, the Data Model page and the MCP tool descriptions. 0.6.4.2 had brought in "element", which left the web
mixing both words; "element" stays only for the items of a batch. A recorded state is a "snapshot", as in the
data model, where the web said "version" in most places; "v1" stays its number.
- **MCP, names:** the tools `list_versions` and `get_version` are now `list_snapshots` and `get_snapshot`; the
parameter `version_id` is `snapshot_id`, and the answers say `snapshots`, `current_snapshot` and `snapshot_count`.
A chat that calls an old name gets "tool not found" once and then sees the new list.
- **Web, page description:** the description search engines and link previews show reads "A digital database for
reclaimed architectural components."
- **Backend, index:** `component_snapshots` gains an index on `identity_id` and `status`, for the check of an
open snapshot. It is built when the server starts.

### Fixed

- **Web, controls that ended in a refusal:** controls the backend would refuse with a 403 or a 409 are hidden,
or disabled with the reason, before a form is filled in (#46, #47).
- **Web, claims:** a claim with a result saves. The form sent no `summary.kind`, so the server answered 422 although
the form said nothing was missing.
- **Tests:** `test_signin.py` passes on Python 3.9.
- **Backup:** `pull_production.ps1` passes SSH keepalive options, after a pull of the assets broke at 1.56 GB.

## [0.6.4.4] - 2026-11-03

Grasshopper hardening, and the beta notice takes its version from the release. Run `CSC_Update` in
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
12 changes: 6 additions & 6 deletions CONTEXT.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# Catalog of Second Chances (CSC)

A research catalog of reclaimed building components: what each physical element is, where it came
A research catalog of reclaimed building components: what each physical component is, where it came
from, what state it is in, and what is known about it --- so it can be designed with and reused.

## Language

### Components and records

**Component**:
A physical reclaimed building element the catalog tracks --- a beam, a panel, a lump of rubble. In user-facing text a
single one is an "element" (not to be confused with a Grasshopper component).
_Avoid_: item, part, piece
A physical reclaimed building component the catalog tracks --- a beam, a panel, a lump of rubble. In user-facing text a
single one is a "component"; on the Grasshopper page the other kind is a "Grasshopper component".
_Avoid_: item, part, piece, element (an element is only an item of a batch)

**Component identity**:
The catalog's permanent record of one physical component, from its arrival to long after its exit.
_Avoid_: entry, component (when the record is meant)
_Avoid_: entry; in user-facing text the record and its UUID are a "component" and a "component id", "identity" stays in code, the API and Grasshopper

**Tag**:
The physical QR label on a component; it carries only the identity's UUID, never a URL.
_Avoid_: label, sticker

**Snapshot**:
One recorded state of a component --- its shape and state from a point in time until the next state.
_Avoid_: version (a snapshot *has* a version number), scan (one way to capture a snapshot's geometry)
_Avoid_: version (a snapshot *has* a version number; also in user-facing text), scan (one way to capture a snapshot's geometry)

**Snapshot photo**:
A general-impression picture of a component in one state, so people get an idea of it regardless of how its geometry is represented. Not evidence.
Expand Down
Loading
Loading