Repository navigation
feat(patchy): import CSV and download generated files - #450
Conversation
Opus reviewThree blocking findings, most severe first. I reproduced each one against the branch. The first two with small scripts, the third from the broker's reservation arithmetic. 1.
|
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. The implementation reuses the existing download card, broker transport, limits registry and SDK packaging. The CSV framing pass addresses the explicit requirement to enforce the cell bound before PapaParse materializes an oversized row. SpecNo merge-blocking intent findings. The diff covers the CSV contract on both import graphs, generated downloads on both page clients, shell-owned approval and byte limits, and the requested documentation and skills. I found no missing requirement, incorrect implementation or extra scope that warrants blocking this merge. Verification in this review:
Applicable surfaces were the shell-local protocol and both clients, SDK packaging/catalogue/skills, product documentation and glossary, served cards, and dismissal/close paths. No CLI-command, dev-runner, migration, company-resource or package-layout change was required. Standards: 0 blockers. Spec: 0 blockers. |
Review follow-upPushed 47aa2b8 (review fixes) and 50057a1 (CI test isolation). Read both conversation reviews, the Reviews-tab bodies and inline comments. The latter two are empty; no Grok review is posted. Fixed
Kept as-is
Verification
Latest commit is |
d85010e to
5a3f3e8
Compare
The refused card now matches the D-1 mock: note-refused paper, the sentence "This file is too large to download (24.1 MB, the limit is 20 MB)." with both sizes from the card's own size format and the limit from the registry, and a plain Dismiss button. Co-Authored-By: Claude Opus 5.5 <[email protected]>
50057a1 to
1f8b40e
Compare
Tier 2 records every invocation, the calls it makes and its `ctx.log` lines, but nobody could read that record outside the database. Owners and admins had no way to see who ran what, as whom, or why an action failed. This adds the per-patch log to the portal, as picked on #385 (L-2 and W-2): - `/patches/<name>/log`, for the patch's current owner and every admin. Everyone else gets a 403, and reassignment moves the owner's access. Rows are top-level invocations, newest first: time, person, version, handler, kind, outcome and duration. A row expands into the calls and nested handlers inside it, in sentence form ("leads.create (mutation) · as the patch"), followed by the patch's `ctx.log` lines. Failed rows open by default. A reply the page never received shows the real settled outcome plus "reply not delivered". Pages hold 25 entries, paged by cursor. Filters cover outcome, person and handler and search 1,000 entries at a time; the page says when older entries lie beyond that window. Connection calls name the connection by handle. Each entry reads and shows at most 50 steps, outermost first, and says when it made more. The nothing-logged and filtered-empty states follow the mock. The page says the log is an attribution record, not an access audit, and that log lines are written by the patch itself. - Recent activity on the card for the owner and admins: the last three entries in sentence form ("Alice Chen · Sales CRM v12 · leads.import (action)"), each linking into the log, then "See the full log". - `InvocationLog` gains two bounded readers over the existing `runtime_invocations` and `runtime_calls` columns: `page` (the card skips its trees) and `choices`, which lists the filter options from the newest 1,000 entries. No migration. The per-connection recent-calls list is unchanged. - The shell component set gains `pill-failed`, `list-tree` and an expandable `table-expand` row. The log table keeps words whole and scrolls inside `portal-table` on phones; other tables are unchanged. - Docs: the `ui-consistency` spec, the Portal glossary (**Log**), `CONTEXT-MAP.md` (Portal → Runtime) and `docs/product.md` (who reads the log). Stacked on `tier2/411-csv-download` (#450); this PR contains only the #412 commits. Implements #412, part of #384. ## Verification - `pnpm lint` and `pnpm typecheck` pass. - Tests pass in `packages/portal`, `packages/runtime`, `packages/core`, `apps/server`, `packages/patches/src/Subscriptions.test.ts` and `packages/patchy/src/devExecution.test.ts`. New cases: - an owner sees a failed action's tree, with the connection call that succeeded before the failure, and is refused another owner's log; - admins read every patch's log, and reassignment moves the owner's access; - Recent activity appears for the owner and admins only; - cursor paging, filters, and the empty states; - `InvocationLog.page` bounds each entry's tree, reads overdue entries as unknown and scopes cursors to the patch. - I checked the log page, card and narrow layouts against the L-2 and W-2 mocks in a real browser against a disposable server with seeded invocations. The versions table on phones is unchanged from before this branch. Built with Claude Opus 5.5 via Claude Code. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Patches had to hand-roll CSV parsing and store generated files just to offer a download. This adds a supported CSV codec on both import graphs and a shell-approved download that needs no file store.
patchy/csvwraps PapaParse with physical-line errors, strict record widths, formula protection, and the 10-million-character / 1-million-cell bounds.patchy.download(name, data)reuses the D-1 card from #408, requires a trusted shell click, and refuses encoded payloads above 20 MiB. The refusal styling follows the #385 pick. Skills, capability announcements, and product documentation describe both APIs.Stacked on
tier2/410-member-directory; this PR targets that branch and contains only the #411 implementation and refusal-styling commits. Implements #384 §12 and closes #411.Verification from the implementation pass
These checks preceded the final refusal-styling commit.
Implemented with GPT-6 Astra via omp; refusal styling refined with Claude Opus 5.5.