Repository navigation
Conversation
|
✅ Internal validation passed. A ZCode maintainer will review the change next; once merged it is published to the marketplace and this PR is closed automatically. |
|
✅ Internal validation passed. A ZCode maintainer will review the change next; once merged it is published to the marketplace and this PR is closed automatically. |
|
✅ Internal validation passed. A ZCode maintainer will review the change next; once merged it is published to the marketplace and this PR is closed automatically. |
|
Thanks for the contribution! This PR no longer applies cleanly on top of the latest 🤖 Copy this prompt into Claude Code / Codex to fix it |
5fac7c2 to
0223ae3
Compare
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
|
Thanks for the detailed write-up and rollback design. The feature itself looks well thought through. Before publishing it in the marketplace, I’d like to align on one boundary: the SessionStart hook rewrites the installed |
…omation colors, recency ordering; bundle patching strictly opt-in (experimental, shim v14)
0223ae3 to
e9597c0
Compare
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
Update (v0.6.0): bundle patching is now strictly opt-in
Thanks @jacksonliuyn for the review — agreed on the boundary. v0.6.0 (this push, rebased on current
main) makes it explicit:~/.zcode/prism-opt-in($ZCODE_PLUGIN_DATA/opt-inis honored as an alternative location).app.asarfound without the marker is automatically stripped on the next session start, the pristine backup is refreshed, and the app is returned to its unpatched state.--applyentry point, which re-derives the intent from the marker (--applyconverges to the marker state;--rollbackstrips unconditionally). Verified end-to-end on a real install:ok(opted in, current) → auto-rollback on marker removal (envelope stripped, pristine == stripped build, byte-verified) → auto re-apply on marker restore (identical content hash).description_i18n, and both READMEs now lead with EXPERIMENTAL, OPT-IN and document the marker as the enable/rollback switch (rm ~/.zcode/prism-opt-in).What user problem does this solve?
The ZCode desktop sidebar gives no per-project identity: every project looks the same, conversations are ordered by join time, and project names are fixed. Prism makes the sidebar scannable at a glance:
…menu → Adjust color (this automation), to override a single automation with the same explicit transparent / follow-project states.orderreorder that never reads or writes the app's persisted manual drag order; toggling it off restores the native order verbatim.Visible behavior and how it was tested
renderer/prism.js, fully defensive — every entry point is wrapped, errors are console-logged only)./Applications/ZCode.applayout across the project / grouped / timeline views: color pickers (project header right-click +…menu, row context menu), conversation-level overrides, per-automation colors on the Automations page (right-click + card…menu, follow-project default, transparent/follow states), grouped-view row icons, recency ordering (38 logic assertions covering four list shapes, stable ties, virtualized-list and unrecognized-DOM fallbacks; 25 additional DOM-level assertions for the automation/grouped-icon paths), and the/statuscommand.hooks/ensure-shim.js) extracts/Applications/ZCode.app/Contents/Resources/app.asar, injects one<script>block intoout/renderer/index.html, repacks and swaps it in place — but only after the opt-in marker exists (see the v0.6.0 section above). It keeps an untouched copy atapp.asar.pristine-backupbefore the first patch, records state in~/.zcode/prism-state.json, touches nothing else (no preferences, no launch agents), and operates only on the default install path. Removing the marker (ornode hooks/ensure-shim.js --rollback, ormv app.asar{.pristine-backup,}) restores the original bundle. Both the plugin README (EN/中文) and the upstream docs document this prominently, including the security trade-off.Zero runtime dependencies
The earlier revision of this PR vendored
node_modules/; current main gitignores that directory, so the hook no longer needs it at all:@electron/asar(MIT) when resolvable (e.g. local development checkouts).hooks/asar-lite.js, a bundled, dependency-free implementation of exactly the archive subset the hook needs: pickle framing, header read/write, SHA-256 whole-file + 4 MB-block integrity, duplicate-content offset sharing, and the.unpackedsidecar directory.asar-lite.jswas verified byte-identical to@electron/asar4.3.1 on (a) a synthetic tree (unicode names, empty/executive/large files, syylinks, unpack patterns) and (b) the real 306 MB application archive (extract + full repack). The marketplace zip is ~35 KB.Version and registration
external_plugins/prism/(kebab-case, per the new external-plugin layout) with.zcode-plugin/plugin.json,hooks/(SessionStart),commands/(/status),LICENSE, and bilingualREADME.md/README_CN.md.marketplace.jsonasprismv0.6.0, categorydeveloper-tools;description_i18nidentical to the manifest. Icon atassets/prism/icon.png(256×256, transparent, rendered from the upstream SVG) with provenance recorded inassets/icon-sources.json.mainshipping upstream v0.6.0 (renderer shim v14, unchanged by the opt-in release; recent changelog: v0.5.0 automation colors, v0.5.1 grouped-view row icons, v0.6.0 opt-in gate).Network, permissions, side effects
/Applications/ZCode.app/Contents/Resources/{app.asar, app.asar.unpacked, app.asar.pristine-backup}and~/.zcode/prism-state.json. User settings live in the rendererlocalStorage.Licensing / provenance
external_plugins/prism/LICENSE).hooks/asar-lite.jsis an original implementation ported from the algorithms of@electron/asar4.3.1 (MIT); the library itself is not redistributed.Checklist
external_plugins/.zcode-plugin/plugin.json;name/versionmatchmarketplace.jsonREADME.mdandREADME_CN.mddeveloper-toolspython3 scripts/validate.py→OK: 51 plugin(s) validated;git diff --checkclean; single commit rebased on currentmain