Repository navigation
feat(plugins): read-only catalog view with search and filters (#15) - #28
Conversation
Catalog UI 1/5. Browses the bundled catalog read-only: text search plus
category, instrument, source, stability and installed/available/update
filters, combinable and clearable. No install action yet (4/5), no
card contents (2/5), no selection (3/5).
plugins:catalog answered a bare array on a missing or damaged bundled
file, which the renderer could not tell from a catalog offering nothing.
It now answers { ok, entries, message? } so the view can say why.
Search and filtering live in the renderer over the rows already fetched,
so browsing never needs the network. The semantics are four IIFE-free
functions in screen.js that tests/plugin-catalog-view.test.js lifts out by
source, which is why that file needs no DOM and no new dependency.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 6 critical 15 high |
🟢 Metrics 6 complexity · 2 duplication
Metric Results Complexity 6 Duplication 2
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
carochacs
left a comment
There was a problem hiding this comment.
Review for #15 (read-only catalog view). No blocking findings.
Checked
node --test tests/plugin-catalog-view.test.js→ 17/17 pass. Not run: the full typecheck (nonode_moduleshere), so CI is the first whole-project check.- Escaping: every catalog field and error string rendered through
innerHTMLgoes throughesc()(screen.js: names, descriptions, versions, facet values,data-valueattributes).esccovers& < > " ', so the attribute context is safe. This matters because the renderer runs withwebSecurity:false, as the code comment notes. - IPC contract change:
plugins:catalognow answers{ ok, entries, message? }instead of a bare array, so a missing or damaged catalog is distinguishable from an empty one. I found exactly one consumer (screen.js~447) and it uses the new shape; preload typing is updated and the test pins the row fields. - The new CI step and
PLUGIN_CATALOG.mdchange are small and consistent with the explicit-suite convention.
Notes (non-blocking)
- The comment in
screen.jscorrectly flags that the git-installed list further down still interpolatesplugin.manifest.descriptionunescaped under the samewebSecurity:false. That is pre-existing and out of this PR's scope, but it is worth its own issue. - Entries the loader rejects individually are still dropped silently, so a catalog whose entries all fail validation answers
okwith no entries; the comment onlistCatalogdocuments it.
This PR does not touch a decision tagged to @itsjustroxi. Not approving or merging.
Generated by Claude Code
|
Thanks for the review — no code changes made, since there were no blocking findings and both notes called for separate work. Note 1 — unescaped git-installed list. Agreed it is real and pre-existing, so it stays out of this PR. Filed as #29 to make it a tracked fix rather than a comment: Note 2 — individually rejected entries. Verified against One clarification for the record: this PR does not touch a decision tagged to you, and it is not asking for approval — it stays open on that basis. Task list (6/6 completed)
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summaries (2 snapshots, latest commit 54d89f4)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 54d89f4)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Previous reviewThis review did not finish. The model reached its output limit before it Reviewed by free · Input: 34.4K · Output: 3.9K · Cached: 131.7K |
No code fix needed — the failure is a third-party review bot hitting its output limitI investigated check suite What actually failedThe suite's only failing check run is
That is a capacity failure inside the reviewing model, not a test, build or lint failure.
Every check the repo owns is green
I reproduced those steps locally on the PR head:
( The contract change is safeThe one behavioural change — Two things worth a maintainer's attentionNeither blocks this PR, and I deliberately did not "fix" them by editing code:
Suggested unblockRe-run the Task list (5/7 completed)
|
Signed-off-by: Carolina <79524656+carochacs@users.noreply.github.com>
|
Fixed the TypeScript syntax error in
|
…creen The merge from main reintroduced the esc() helper this branch had already declared, leaving two `const esc` in the same IIFE scope and a SyntaxError under 'use strict' that stopped screen.js loading entirely. Fold the surviving comment to cover both call sites (catalog and LAN status), and add a guard test: the suite lifts only four functions out of screen.js, so nothing else in the file was ever parsed.

Catalog UI 1/5 for #4. Prerequisite check first: the catalog/schema issue named in #4 is #2, and it has landed —
resources/plugin-catalog.json,resources/plugin-catalog.schema.jsonandscripts/validate-plugin-catalog.jsare all onmain, so no schema was invented here.Read-only browsing only. No install action (4/5), no card contents (2/5), no selection or dependency behaviour (3/5).
What it does
The Plugin Manager screen gains a Browse catalog section above the existing install-from-git form:
piano keysnarrows rather than widens.installed/available/update available).Search and filtering run in the renderer over the rows already fetched from disk, so browsing is offline by construction:
plugins:catalogreadsresources/plugin-catalog.json(orprocess.resourcesPath) with nofetchanywhere on this path.One contract change
plugins:catalogreturned a bare array, and on a missing or damaged bundled filelistCatalog()returned[]— indistinguishable from a catalog that genuinely offers nothing. It now answers{ ok, entries, message? }, and the view rendersmessageas an error state.preload.tsanddocs/PLUGIN_CATALOG.mdare updated to match. The error is sticky: typing or ticking after a failure cannot overwrite it with "the bundled catalog has no plugins".This is a deliberate change to an IPC answer shape, made now while no renderer consumed it yet.
installCatalogandrollbackCatalogare untouched.Tests
tests/plugin-catalog-view.test.js, 17 tests,node --test, no new dependency. It lifts the four IIFE-free functions (pmCatalogState,pmCatalogHaystack,pmCatalogFacets,pmFilterCatalog) out ofscreen.jsby source — the same techniquetests/monitor-mute-suppression.test.jsalready uses for the audio screen — which avoids standing up a DOM harness. Covered: search by each searchable field, case-insensitivity, ANDed terms, a blank query not filtering, each of the five filters, OR-within / AND-across, clearing, non-mutation, the install-state derivation, facet derivation, and the real bundledresources/plugin-catalog.jsonlisting and filtering with no network.Added as a named step in
.github/workflows/ci.yml—npm testglobs suites that need the JUCE submodule and native build, so a newtests/*.test.jsnever runs in CI unless named explicitly.Verification
node --test tests/plugin-catalog-view.test.js— 17 pass.node --test tests/plugin-installer.test.js(48),tests/plugin-catalog.test.js,tests/contract-check.test.js,tests/renderer-capability-migration.test.js— all pass.tsc --noEmitoversrc/main/plugin-manager.tsandsrc/main/preload.ts— clean. Fullnpm run typecheckwas not run: the JUCE submodule is absent from a clean checkout, so it cannot run locally.Not in this PR
One thing the reviewer surfaced that I left alone to keep the PR scoped: the pre-existing git-installed list in
refreshList()interpolatesmanifest.name,manifest.descriptionandplugin.nameintoinnerHTMLunescaped, underwebSecurity: false(src/main/main.ts:413). Those values come from an arbitrary cloned repository'splugin.json. It is not a regression from this change, but the newesc()comment now points at it — worth a separate fix.big-pickle(free) | 𝕏