Repository navigation
fix(apps): the batch-1 connector apps carry their own iconUrl - #28662
Conversation
connector-github and connector-stripe each own a neutral connector glyph under assets/icon.svg, and objectstack.manifest.json points iconUrl at its raw.githubusercontent.com URL on main, the way HotCRM's manifest does. Each app's listing test now refuses a manifest whose iconUrl is absent or not http(s). Claude-Session: https://claude.ai/code/session_01FEkQ5p28hxU1qvesRWw9LU Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check
What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo 席位核对ACCEPT · The maintainer's standing authorisation for landing reviewed PRs, verbatim: 「按照 pm-dispatch 规则复核过的都授权」.
Generated by Claude Code |
Requested by Leehom · project thread
Fixes #28588
Clause-②: no
Metadata-protocol: none
维护者速读
assets/icon.svg,objectstack.manifest.json加上指向它的iconUrl(main 上的 raw.githubusercontent.com 地址,和 HotCRM 的写法一致)。--icon-url临时补。packages/apps/connector-github/objectstack.manifest.json(新增的iconUrl行);packages/apps/connector-github/test/listing.test.ts(新增的三个用例);packages/apps/connector-github/assets/icon.svg。pnpm --filter @objectstack/connector-app-github exec vitest run test/listing.test.ts,预期 8/8 通过;把清单里的iconUrl行删掉再跑,预期 2 个用例失败。What changes
packages/apps/connector-github/assets/icon.svg,packages/apps/connector-stripe/assets/icon.svg(new): a neutral connector glyph (a white plug on a rounded square, 256 by 256, the same frame as HotCRM'sassets/icon.svg), slate for GitHub and teal for Stripe. No vendor artwork.objectstack.manifest.jsonfiles gainiconUrl:https://raw.githubusercontent.com/objectstack-ai/objectstack/main/packages/apps/APP/assets/icon.svg, with APP the package directory. It resolves once this PR is onmain; that is the shape the handbook's HotCRM example uses (content/docs/deployment/marketplace-handbook.mdx, the worked example).test/listing.test.tsfiles (extended rather than a parallel file, since they already read the manifest) gain three cases:carries a public http(s) iconUrl: the manifest'siconUrlis a string that parses as a URL with anhttp:orhttps:scheme.TemplateManifestSchematakes any URL scheme, so the scheme is checked in the test.refuses an iconUrl that is absent or not http(s): the control. The same predicate answers a problem for the manifest without the key, for anftp:URL and for a relative path (fixture objects, no file edit).points iconUrl at the icon this package owns: the URL is the one above,assets/icon.svgexists in the package, it is under the 256 KB bound--icon-fileuses, and it is a 256 by 256 SVG.Icon choice and brand basis
I shipped the neutral glyph for both apps. I could not cite a usage permission for either vendor's logo from this session, and the order says not to download a vendor logo without one, so the card's safe default applies. Both icons are drawn here, from primitives, and carry no vendor mark. The listing still names the vendor in
displayName; a vendor mark can replace the glyph later in its own PR once someone cites that vendor's published permission.Publishing
Both packages are
"private": true, so nothing reaches npm and this PR carriesskip-changeset. Packagefilestherefore does not apply. The icon is served from the repository tree, which is where the URL points.Tests
Red on the base manifests, green at head
Run per app:
pnpm --filter @objectstack/connector-app-APP exec vitest run --maxWorkers=2 test/listing.test.ts.Red leg: head's tests with both manifests restored to base
f23e0512(tree only,git restore --source;grep -c iconUrlanswered 0 for each):Restored with
git checkout HEAD -- both manifests;git diff HEADempty afterwards. Green leg: connector-githubTests 8 passed (8), connector-stripeTests 12 passed (12).Full package runs at
6bdaa4b1, under the verify lock, after building the^...closure of both apps:tsc --listFilesincludes bothtest/*.test.tsfiles of connector-github, so the typecheck covers the new cases.Local gates
At head
6bdaa4b1, thedispatch-gates.mjs --commandsderivation for this diff (47 families) pluscheck:template-manifests, each command run in turn with its exit code captured before any pipe. Reconciliation (--ran): 47 derived, 46 run with exit 0, 1 NOT MEASURED, 0 unrun.pnpm check:dual-build-cjs-loadsexits 3 (PREREQUISITE NOT MET: it reads the builtdist/of packages outside this diff's closure, such asclient-react). The CI run ofLint & Repo Gatesis its reading.node scripts/check-plugin-teardown-shape.mjs --self-testfirst exited 3 (its positive-control commit was not in the shallow clone); aftergit fetch --depth=1 origin 621a487607881c66b2899b7e3477115229a156b4it exits 0, 48 cases.pnpm --filter @objectstack/spec check:template-manifests(outside the derivation, run because it parses every shipped manifest): exit 0.pnpm lintand the rest of the farm;test:repo(no repo-project file touched).Acceptance notes
TemplateManifestSchema.iconUrlisz.string().url(), so it accepts any scheme, while the handbook asks for a public http(s) URL. The per-app test holds the scheme for these two apps. Whether the shelf's later apps should share one rule (or the schema should say http(s)) is the seat's call; this PR adds no repo-wide gate, as the triage ruled.packages/apps/connector-*(search of open PRs naming connector, 3 hits; file lists of feat(console): Connector connections page — connection status and Connect / Reconnect / Disconnect for OAuth connector instances #28651 and docs(qa): wave-3 checklist accuracy slice S9 — the 20 W3-C1R findings at eeec88d1 (#27377) #28652 read, 0 paths under it).Verification
Clause-②: nomeasured: the diff changes two private app manifests, two SVG assets and two test files. No served route, schema, export or published file moves.Metadata-protocol: none: no authorable key or accepted value changes;iconUrlwas already allowed.Generated by Claude Code