Skip to content

fix: registry UX truthfulness — try-out gating, snippet correctness, stable ordering, homepage, ref discovery - #44

Open
scarmuega wants to merge 1 commit into
mainfrom
fix/registry-ux-feedback-cba-07
Open

fix: registry UX truthfulness — try-out gating, snippet correctness, stable ordering, homepage, ref discovery#44
scarmuega wants to merge 1 commit into
mainfrom
fix/registry-ux-feedback-cba-07

Conversation

@scarmuega

Copy link
Copy Markdown
Contributor

Plan

plans/feedback-cba-07-services-docs-registry-ux.md (Trellis root Brain/tx3, owner org/coder) — items A, B, C, E and the registry half of D. Origin: user feedback ("UI lies", Bodega, Appendix).

Done criterion (from the plan) and status

  • A — Try-out tab only shows channels with a real profile in the .tii: met. Publishers emit empty stubs for every known channel (verified against the published open-tx3/bodega-market TII: local/preview/preprod are {environment: {}, parties: {}}), so the tab now filters profiles to those with actual parties or environment content. When plan 06 publishes the missing profiles they appear with no further UI work.
  • B — Snippets import from the generated protocol module, no gen/ in any language: met. TS ./{name}/protocol (the generated protocol.ts), Python from {snake_name} import ..., Go "yourapp/{name}" (generated package name is protocol), Rust was already clean (use {snake_name}::Client). The setup-step note now states the real default codegen output dir (.tx3/codegen/{plugin}/{name}/ per trix CodegenConfig::output_dir) instead of the nonexistent ./gen/....
  • C — Transactions/parties order stable across reloads: met. Root cause was backend resolvers iterating the TII HashMaps; both resolvers now sort by name.
  • D (registry half) — homepage rendered; project_info_ref listable: implemented. homepageUrl is read from the org.opencontainers.image.url OCI manifest annotation on the detail pull and rendered in the info panel. The Activity match detail now lists the matched transaction's reference inputs (txhash#index), which is the discovery surface for ref-UTxO parameters such as bodega's project_info_ref — the values real on-chain transactions used. Note: it renders for bodega once trix publish emits the homepage annotation and bodega is republished (see companion PR open-tx3/bodega-protocols and the follow-up plan in the Trellis root).
  • E — signer on withParticipant/withUser, script addresses from env: met. The signer now goes on the first non-script unbound party; script parties (*script) take a bech32 address from the profile environment when one is published, and an explicit <name script address> placeholder otherwise — never the caller's own signer/address. Verified against the published bodega (signer was landing on positionscript) and hydra-heads (signer was landing on commitscript) TIIs.

Verification run

  • cargo check and cargo test (backend): 21 unit tests pass. The 9 db_matches + graphql integration tests fail locally with DATABASE_URL must be set — pre-existing environmental requirement (live Postgres), unrelated to this change (db.rs untouched); reported as a finding.
  • pnpm lint, pnpm typecheck (frontend): clean.
  • pnpm codegen regenerated @types/graphql.d.ts from the backend-exported SDL (frontend/schema.graphql synced from cargo test regenerate_sdl output).
  • Functional check of the snippet generators against the real published bodega-market and hydra-heads TII shapes: empty channels filtered; signer on withUser/withParticipant; script parties get named placeholders; imports carry no gen/ segment.

Escalations

None for this PR. Residual work (trix [protocol].homepage → OCI annotation emission; bodega .tx3 reference-datum read to drop the project_info_ref caller param; SDKs-tab channel dropdown gating) is filed as a draft plan in the Trellis root.

🤖 Generated with Claude Code

…stable ordering, homepage, ref discovery

- Try-out tab: gate channels on actual profile presence in the .tii;
  empty channel stubs (environment/parties both empty) are hidden.
- Quick-start snippets: import from the generated protocol module (no
  gen/ segment) in all four languages; setup notes state the real
  default codegen output dir (.tx3/codegen/{plugin}/).
- Quick-start snippets: the signer goes on the first non-script party
  (user/participant), never on a script party; script parties take
  their address from the profile env when published, and an explicit
  '<name script address>' placeholder otherwise.
- Backend: transactions and parties resolvers sort by name so the UI
  order is stable across reloads (TII maps have no iteration order).
- Backend/frontend: homepageUrl read from the org.opencontainers.image.url
  manifest annotation and rendered in the protocol info panel.
- Activity: reference inputs of each match are parsed and listed in the
  detail view so callers can discover ref-UTxO parameter values (e.g.
  bodega's project_info_ref).

Plan: Brain/tx3 plans/feedback-cba-07-services-docs-registry-ux.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant