Skip to content

feat(library): save the selected assets as a CSV catalogue - #620

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-xfmkzn
Oct 18, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-xfmkzn

Conversation

@adeelahmad

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the Library could export selected assets' content, but there was no way to get a list of them for a spreadsheet.

After: Library › Export › Catalogue of all selected (.csv) saves one row per asset: title, namespace, collection, kind, date, length, people, tags, language, status, access, origin and a link. Cells that start like a formula (=, +, @, tab, carriage return) get a leading apostrophe so a title someone else wrote can't run when the file is opened.

How: a new lib/csv.ts (RFC 4180 quoting plus the formula guard) shared with the audit log's existing CSV export; components/library/model.ts builds the rows from what the Library already loaded.

Motivation and Context

Item from the personal feature plan sheet ("export a catalogue / inventory").

Screenshots (if appropriate):

n/a

Steps to reproduce (if appropriate):

Select assets in the Library, then Export › Catalogue of all selected (.csv).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests (__tests__/library-catalogue.test.ts).
  • My change requires documentation updates, and I have updated docs/ accordingly (docs/processing.md, Finding by any attribute).
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. Written as changelog.d/catalogue-csv.md, per build(release): changelog fragments in changelog.d/ instead of one Unreleased section #581.

Done questions (AGENTS.md)

  • Goal: delivers what the user wanted, merged on green CI.
  • Agents: usable through the API, MCP or an assistant tool. Every column comes from the resources API agents already read; the CSV is the web app's view of it.
  • Zero setup: no new prerequisite, .env edit or manual step.
  • Fewest clicks and keystrokes. Two clicks from a selection.
  • Configurable: new settings in the web app with defaults; wizard asks only what is required. n/a: no settings.
  • Light: default install still runs on a Raspberry Pi with cloud models. Built in the browser; no server work.
  • Private and secure: data local and encrypted, passkeys, threat model updated. The file is made in the browser; formula injection is defused.
  • Cost: cheapest path, model calls in the activity ledger, budgets respected. n/a: no model calls.
  • User decides: consequential or new actions wait for the user; defaults unchanged.
  • Upgrades: existing installs upgrade safely (upgrade step for stored-data changes). n/a: no stored data.
  • Honest: sources cited; labelled built, in progress or planned.
  • Tests, docs and generated files updated.
  • Open standards; dependencies keep Lens MIT. CSV per RFC 4180.
  • Result reported with evidence; "refine later" items written down.
  • Reuse: existing Lens code and permissive libraries reused, nothing reinvented. The audit log's CSV export now shares the same helper.

Local CI (ci/local-ci.sh): FastAPI (embedded and server), Next.js, pre-commit and PR title passed.


Generated by Claude Code

@adeelahmad adeelahmad self-assigned this Oct 18, 2026
@adeelahmad
adeelahmad merged commit ef02de8 into main Oct 18, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-xfmkzn branch October 18, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants