Skip to content

feat(dashapps): add DashApps, an app registry with endorsements and reviews - #127

Merged
thephez merged 52 commits into
mainfrom
feat/dashapps-v14
Nov 24, 2026
Merged

thephez merged 52 commits into
mainfrom
feat/dashapps-v14

Conversation

@thephez

@thephez thephez commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Adds DashApps, a new React + TypeScript + Vite example app for discovering Dash Platform apps. It looks up each contract on Dash Platform, shows its declared description when no community listing provides one, and adds listings from a community registry, plus ratings and reviews. The registry contract uses protocol v14 features: refersTo references, proven averages, grouped counts, and ranked / having queries.

Highlights

  • Registry contract: three document types.

    • appMetadata is one listing per identity per contract.
    • appEndorsement lets a contract's owner mark one listing as official.
    • appReview is a 1–5 star review that the contract's owner can't post on their own app.

    Every contractId is a refersTo reference, so the network rejects a document that points at a missing contract and checks who owns it.

  • Discovery: recent listings, name-prefix search, category browsing, Keyword Search contract lookups and per-contract listings, all paged by the network. Listings carry Official or Community badges, and there's an "Official only" switch.

  • Reviews: each app page shows a proven documents.average and a per-star histogram from one grouped count. Reviews are listed in an order the network serves (newest, highest, lowest, or a single star value). A leaderboard and a 4★+ filter come from ranked and having.

  • Writes: signed-in testnet users can submit, edit and withdraw listings and reviews. Contract owners can endorse a listing, point the endorsement at a different listing, or withdraw it. Sign-in accepts a recovery phrase or a WIF key, and mainnet is read-only.

  • Settings: the registry contract is set per network, and testnet has a published default. The app flags a saved registry that was made for an older version of the app. App links open behind a trust interstitial.

  • Tests: a Vitest suite runs on mocked SDK responses. A Playwright suite runs read-only against testnet on desktop and mobile:

    • It clicks through every view and fails on any console error.
    • It checks invariants that hold for any live data, such as the histogram adding up to the review count and leaderboard counts matching each app's own.
    • Its signed-in spec only opens and cancels dialogs, and it's skipped without PLATFORM_MNEMONIC.
  • Outside the app:

    • A new dashapps-ci.yml workflow.
    • DashApps is listed in example-apps/README.md.
    • DashApps is added to check-shared-auth-parity.sh.
    • The unknown-identity error in dashnote and token-ops now says "on the selected network" instead of "on testnet".

🤖 Generated with Claude Code

thephez and others added 30 commits November 18, 2026 21:39
…ublishing

Extend the registry schema with tagline, category, tags, appUrl and iconUrl, and add a category browser, a provenance icon for owner-provided metadata, and a redesigned settings page with network switching and a "Publish a new registry" action that registers the contract and seeds curated system contract entries.

Point testnet at the newly deployed registry contract.
Add a Dashapps CI workflow matching the other example apps: npm ci, vitest, and a typechecked build on changes to the app or the shared SDK core.
Remove the "Loading…" status line that appeared below the search field while opening an app, and add a regression test for it.

Move the search field focus ring to the wrapper so the whole control highlights, and add spacing between the search box and the discover section.
Search now matches cached registry entries by name, tagline, description, and tags and lists them ahead of raw keyword hits, deduplicating any contract that appears in both.

Registry entries are cached per network in SessionViews so they survive Browser remounts and are available to search without re-fetching.

Also set the search term and searched flag before the query resolves so the results header reflects the active search immediately.
Remove the network picker from the topbar and Settings, along with its styles and the stored network preference, so the session always connects to testnet. A stored mainnet preference is now ignored rather than rejected at the sign-in boundary.

The registry page reader previously mapped `registryEntry` over the whole result, so a single malformed document threw and discarded every valid entry on the page. `query` now returns the parsed entries alongside the raw row count and last document ID, skipping documents that fail validation while keeping pagination keyed to the server's response.
Every "Launch app" link now opens an ExternalLaunch confirmation dialog instead of navigating straight out. The dialog names the destination hostname, shows the full URL, and states that DashApps neither controls nor endorses it.
OwnerResolver now derives a plain ContractSummary from each found contract and persists it in localStorage, keyed by network. Detail screens, search results, and registry owner badges read the cache synchronously so they paint real content on the first frame instead of an empty shell, then update when the network read resolves.

Only found resolutions are persisted, and stored entries are validated field by field on load, so a missing contract, a failed read, or tampered storage cannot fabricate a summary. A confirmed-missing contract clears its cached summary; a failed revalidation leaves it visible. The store holds the 1000 most recent entries and treats quota or privacy-mode failures as non-fatal.

Registry loading now shows a skeleton entry rather than a bare status line, the detail refresh button reads "Refreshing…" while busy, and hero action pills get a fixed width so the layout does not shift as content arrives.
The detail page now leads with the app's own identity and resources instead of a raw metadata dump. The hero carries the category, publisher, and launch actions, an "About this app" section holds the description, tags, and website/repository/docs rows, and contract internals move into a collapsed "Technical details" panel that lists each document type with its property and index counts.

Canonical and community registry entries collapse into one listing switcher. The contract owner's listing is selected by default, the bar names whose listing is on screen, and expanding it shows every proposal with publisher, revision, and date so the choice is explicit. A contract with a single listing and no signed-in identity renders nothing rather than an empty switcher.

Add a header account control with sign-in and sign-out, and give the Mine screen its own sign-in card so neither path requires a trip to settings. Both sign-in dialogs and the external-launch interstitial now render through a portal into document.body, which keeps a modal click from also opening the card behind it.

Extract ContractCopyButton so copy confirmation is announced and its reset timer is cleared on unmount, render only http and https URLs from registry metadata as links, and strip repeated trailing dots from resolved DPNS names before appending the suffix.
Sign-in now takes either a recovery phrase or a single authentication private key. The two shapes are told apart by whitespace, so a WIF skips mnemonic derivation entirely and resolves its identity by public-key hash instead. Neither secret is written to browser storage.

The key must be an AUTHENTICATION key at HIGH or CRITICAL security level. A MASTER key would sign in and then fail at the first write, so it is rejected up front with the level it actually carries, as are disabled keys. Key matching compares full secp256k1 keys and their HASH160 form, honoring the SDK's key type so a BIP13 script hash or EDDSA hash is never treated as signable by the pasted WIF.

A key registered to several identities resolves through the non-unique lookup, which pages until a second match proves ambiguity and then asks for an explicit identity ID rather than guessing. Pagination aborts if a cursor fails to advance. The form exposes that identity ID field for exactly this case.

Session and registry helpers now depend on a local DashKeyManager interface rather than the tutorial's IdentityKeyManager, so a WIF-backed session satisfies the same contract as a derived one.

Alongside this, listing management moves out of the registry section: the add and edit controls portal into the detail page's resource list, the metadata editor opens as a modal, and each explorer row can edit that identity's own entry for the contract.
…heck

Add the dashapps entry to the example apps README and extend the shared-auth parity script to compare its login, secret-shape, key-manager, and resolver test files against Dashnote.
Tag the fetched own entries with the network/registry/identity they were loaded for and treat them as empty whenever that scope no longer matches, so switching session no longer shows the previous account's entries until the new fetch resolves.
…ry grid

Featured and also-featured cards now act as links to the app detail page, with keyboard activation and the inner Details button stopping propagation, and navigating to a detail page scrolls back to the top.

The category grid shows only the categories that have entries behind a "More categories" toggle, scrolling horizontally on narrow screens, and the shelf card lays its launch pill out on a grid instead of a column. Launch buttons read "Launch ↗" so they fit, and the redundant Details pill is hidden on mobile.

Extract the metadata editor modal into a shared component so both call sites close on Escape or a backdrop click.
Add an `appRating` document type to the registry contract: one 1–5 star rating per identity per contract with an optional title and review. Indices are the unique `ownerContract`, a countable + rangeCountable `byContractStars` for the grouped distribution, star filter and highest/lowest ordering, and `byContractCreated` for recency. No index is summable, so the shared-prefix aggregation conflict from dashpay/platform#3960 cannot occur; a schema test enforces that rule.

Reads derive the total and average client-side from a `GROUP BY stars` provable count and page reviews by document ID. Writes reuse the metadata write path (fresh target preflight, contract-aware serialization, revision bump, 40105 classified as edit), now shared through `documentWrites.ts`.

The app page gains a Ratings & reviews section under the metadata strip and an average in the hero: star meter, clickable histogram, star picker with a review editor modal, sort chips, review cards with DPNS names, and Edit/Remove for the signed-in user's own rating.

Point the testnet default at the republished registry `BXcWyLZDtcPrEmd8tmPt6A7h4YuqgPGVJU1PBvs1dYiS`. Add unit, component and app tests, and fix the smoke spec's ambiguous Search button match.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signing in to rate no longer swaps out the ratings CTA in place; the form is portaled into a backdrop overlay that closes on an outside click, matching the header sign-in.
Platform silently ignores `desc` in `orderBy`, so "Most recent" and "Highest rated" came back ascending. `listRatings` now scans an app's ratings to completion through the serving index (100 per page, document-ID cursor, 2,000-document ceiling) and sorts in JS; the ratings section reveals 25 at a time with Show more instead of paging server-side.

"Sign in to rate" opens the same portal dialog as the header sign-in instead of rendering the form inline. Stub `window.scrollTo` in the app tests to silence jsdom's not-implemented noise from the detail page's scroll-to-top effect.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Describe the ratings feature and registry submissions now that they work, replacing the "writes await schema probes" note.
Both files diverged from the format the other example apps share. CLAUDE.md read as a session log — attempt-by-attempt debugging narrative at specific block heights, superseded contract IDs, point-in-time test counts — and was missing Project Overview, Commands, Architecture, and the load-anchor rules every sibling documents. README.md had no section headings at all and described the app in terms of what it was being extended into rather than what it does.

Both now follow the sibling section order, link every file they name, and drop references to files that aren't tracked in the repo.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Brings dashapps in line with the rest of the repo. Build, lint, and all 155 unit tests pass without code changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Protocol version 14 (dashpay/platform#5350) stores unsigned integer index values in value order, so a grouped `count` by stars now returns keys "01".."05" instead of the sign-flipped "81".."85". dashapps looked up the old keys, so on current testnet every app's histogram, total, and average read as zero. A read-only testnet check confirmed the live registry returns "03", "04", "05" for the three rated apps.

Replace `starsKeyHex` with `starsFromKeyHex`, which decodes the returned keys and masks off the top bit so both the PV14 and pre-PV14 forms work. Unlike dashrate, which logs and skips an unrecognized key, dashapps keeps its existing behavior of rejecting a malformed count response so an encoding change surfaces as an error rather than a silent zero.

Unit tests now feed literal network-format keys rather than stubs built with the app's own encoder, which is why the break went unnoticed. The new tests fail against the previous code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The network now applies `desc` in orderBy, so the client-side workarounds go:

- Ratings: listRatings returns one server-ordered page instead of scanning
  to completion (2,000 ceiling) and sorting in JS. Most recent is
  `$createdAt desc` on byContractCreated; Highest/Lowest are `stars
  desc/asc` and the star filter is `stars ==`, both on byContractStars.
  Each page asks for limit + 1 so "Load more" only shows when another
  page exists, pages by document-ID startAfter, and rejects a cursor
  that does not advance. "Show more" (client reveal) becomes a server
  "Load more"; responses from an earlier load are dropped.
- Category browser: `category ==` + `$createdAt desc` with limit + 1
  paging and a Load more, replacing the first-25-ascending-then-reverse
  read that hid every entry past the 25th. Entries still collapse per
  target contract over what is loaded.
- Proposals for one contract: server `$createdAt desc` instead of an
  ascending scan reversed in JS (still read to completion for the
  listing switcher).
- Grouped-count keys decode as the plain rating byte; the old
  `& 0x7f` mask and its test are gone, and the old form now rejects the
  summary like any unknown key.
- myEntries stays a scan: no index orders an owner's entries by time.

The rating editor already stays locked while ratings reload after a save
(the own rating is scoped to the refresh token); that is now commented and
pinned by a test. Unit tests feed rows in an order no local sort produces,
so any client re-sort fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- test/e2e/ratings.spec.ts reads live testnet data, read-only: it finds
  the most-rated app with one SDK query (skipping if there is none),
  opens it, and checks the review list is server-ordered newest first and
  that the rating total (derived from the grouped-count histogram) equals
  the number of reviews listed once every page is loaded.
- Rating cards carry data-created-at, the "Most recent" ordering key (the
  visible time is the last edit and relative).
- Pin @playwright/test to exactly 1.61.1, as every sibling app on main
  does since #123, so all apps share one Chromium build. The caret range
  had resolved 1.62.1; only @playwright/test, playwright and
  playwright-core change in the lockfile (Node 22.22.3, npm 10.9.8).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Replace the "Platform ignores desc" gotcha: the network sorts desc
  server-side, and allProposals and myEntries still read to completion.
- Grouped-count keys: plain rating byte only.
- Server-ordered paging pattern (limit + 1, last-shown cursor, no
  re-sort) in place of the client-sort rating-list note, plus a gotcha
  that a startAfter cursor is a live document.
- Index notes say which sort each index serves.
- Shared auth files: drop the stale DashNames reference and point at the
  repo's parity check script.
- e2e: describe the live ratings spec. README matches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eview aggregates

Replace the registry schema in contract.ts with the new schema.
Settings -> register now publishes it; the testnet default and all
reads/writes stay on the current registry.

- appMetadata: same property set; contractId refersTo a contract and is
  immutable; transferable 0 / tradeMode 0 so the endorsement's findBy
  keys never move; indices ownerContract (unique), contractEntries
  (countable + rangeCountable, unranked), contractRecent, recent,
  byCategoryRecent, byName, byOwner.
- appEndorsement: owner-only (contractRequirements.owner "self"),
  required mutable publisherId resolved by findBy on appMetadata's
  ownerContract, deletable, no history, transferable/tradeMode 0;
  indices byContract (unique), byPublisher, recent, byOwner.
- appReview: dashrate's review layout with owner "other"; averageable +
  ranked contractRating, unranked contractStars histogram, recency and
  per-star recency indices.
- No keywords: each costs 0.1 DASH at registration. The description
  stays (3-100 bytes, no registration fee of its own).
- buildRegistryContract builds the exact published contract (schemas,
  config, description) at the SDK's platform version and refuses older versions.

contractSchema.test.ts pins every property, index, required list,
refersTo, immutable list and the transferable/history rules, checks
findBy preconditions and the ranked-prefix rule, and parses the built
contract with the SDK's WASM parser, including four
schemas it must reject. The old "no summable index" (#3960) assertion
is gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ratings now read and write the registry's appReview type. The summary
takes its count and average from a proven `average` on contractRating
and its histogram from the grouped `count` with the stars range; a page
of apps gets its averages from one grouped `average` per 100 contracts,
converting the identifier hex keys and filling in unrated contracts.
Review lists page newest first through contractRecent and
contractStarsRecent, and a user's reviews through ownerRecent.

The write preflight now returns the target contract's owner, so an owner
reviewing their own contract is refused before broadcasting, and
reference, owner-requirement and immutability refusals from the network
are reworded for the user.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… reads

The testnet default is now the registry with appEndorsement. An entry is
official when the contract's owner has endorsed its publisher, replacing
the owner-derived classification and the unused canonical module. Pages
of entries get their official marker from one batched endorsement lookup,
Discover keeps one row per contract preferring the official entry, and
the detail page reads the endorsed publisher's entry plus a paged list of
every entry and its count.

Every entry list is now a server-ordered page: recent, category, name,
a contract's entries by last update, and My submissions through byOwner,
which replaces the read-to-completion scans. Edit buttons on a page come
from one `in` lookup of the signed-in user's entries.

Adds endorsement writes (endorse self or a delegate, re-point, withdraw),
returns the target's owner from entry creation, ranked and having reads
for top rated, most rated and 4-star-plus contracts with a hook that also
names their rows, and backs up all three document types.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Documents the three document types and their indices, the official-entry
rule, the aggregate, ranking and paging queries, and the gotchas they
bring: hex identifier keys, zero-filling empty groups, the histogram's
range clause, unordered ranking ties, and dangling endorsements.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
thephez and others added 13 commits November 18, 2026 21:39
- The leaderboard and 4★+ set reload after a review is saved or removed
  and after any registry write, instead of staying on their first load.
- "Official only" no longer replaces the official publishers the
  featured shelves use.
- The official feed says "No official listings on this page." when more
  pages remain.
- After creating an entry, the mark-official step is skipped when the
  owner has already endorsed a listing, so it never re-points silently.
- "Not now" is a secondary button; the owner panel is a labelled section
  and the listing filter a labelled group.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A registry ID saved in the browser can point at an older registry that
lacks the endorsement and review document types, so every page showed
raw network errors. Check a non-default registry once per connection
and, when types are missing, show one notice with a button that clears
the saved ID and returns to the default registry instead of loading the
views.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ariants

Add a chromium-mobile project beside chromium-desktop, as in the sibling
apps, and drop the smoke test's manual viewport resize. New read-only
checks against the default registry, each comparing independent queries:
the star histogram sums to the review count, each Most rated row matches
the app's own count, every app the 4★+ filter keeps averages at least 4,
and an app from the Official only feed shows the Official badge. Apps are
found at run time and each test skips when the registry has no data.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A registry check that fails shows "Couldn't check the registry." with
  Try again, instead of loading views that would hit an older registry.
- The older-registry notice only suggests the default registry on a
  network that has one.
- Tests cover the pending and failed checks and that a current saved
  registry is actually checked.
- e2e: the Official badge check skips unless an endorsement still points
  at an existing entry, and the 4★+ check skips on an empty registry.
- Docs: the registry declares a description but no keywords.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Change and Save registry shared one <button> element, so React flipped it
to type="submit" mid-click and the browser submitted the form: the editor
closed at once and the current registry ID was saved as an override.
Separate keys keep them distinct elements. Saving the default registry
now stores no override, so a later default still applies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Discover, Search, category, app detail, Settings and the sign-in dialog
are now driven in a real browser on desktop and mobile: each control is
clicked or typed into and its visible result asserted, every page is
checked for console errors and horizontal overflow, and keyboard access
is covered. Bugs the suite exposes are kept as expected failures.

Spec files run on four workers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signs in through the app's own form with PLATFORM_MNEMONIC and checks
the header, identity chip, owner panel, Mine and its endorsements, and
the listing and review dialogs, which are filled, validated and
cancelled. Skips when no mnemonic is set; traces are off for the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Search waits for the connection and queries registry names through the
  byName index instead of only Discover's loaded page; a rejected keyword
  shows just its error.
- Every dialog closes on Escape and returns focus to the control that
  opened it, including sign-in and the listing editor.
- A guest who adds an app gets a sign-in prompt for their entry.
- The feed, Official only and the leaderboard show a loading state until
  their first load instead of an empty message.
- An app page's back link names the view it returns to, and Technical
  details says Collapse while open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merges tests that walk the same view into one test per view or control
group, folds the official-badge and 4★+ invariants into Discover's spec,
and reuses the shared fixture across specs. Each fixed bug and the
Settings Change button keep a regression check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e sign-in

Search shows one row per contract, preferring the official listing, and
runs the name and keyword searches independently: a term too short or
long for a keyword still searches names, and one failed search no
longer hides the other's results. Closing an inline sign-in form
focuses its card's "Sign in" button again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The signed-in spec checks the listing form's validity instead of
pressing its submit button; the Search test escapes the listing name
in its pattern, and listedName() orders by creation time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
listedName now returns the newest app's official or only listing, so the
Search test keeps passing once a contract has a second, unofficial entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 117 files, which is 17 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e379a04-0ddd-438e-91f8-df291da3f570
Commits

Reviewing files that changed from the base of the PR and between a90cb8c and 33bc430.

Files ignored due to path filters: 1

  • example-apps/dashapps/package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 117

  • .github/workflows/dashapps-ci.yml
  • example-apps/README.md
  • example-apps/dashapps/.prettierignore
  • example-apps/dashapps/.prettierrc.json
  • example-apps/dashapps/CLAUDE.md
  • example-apps/dashapps/README.md
  • example-apps/dashapps/eslint.config.js
  • example-apps/dashapps/index.html
  • example-apps/dashapps/package.json
  • example-apps/dashapps/playwright.config.ts
  • example-apps/dashapps/scripts/backup-registry.mjs
  • example-apps/dashapps/src/App.tsx
  • example-apps/dashapps/src/components/AppRatings.tsx
  • example-apps/dashapps/src/components/ContractCopyButton.tsx
  • example-apps/dashapps/src/components/DpnsName.tsx
  • example-apps/dashapps/src/components/ExternalLaunch.tsx
  • example-apps/dashapps/src/components/HeaderAccount.tsx
  • example-apps/dashapps/src/components/IdentityChip.tsx
  • example-apps/dashapps/src/components/Leaderboard.tsx
  • example-apps/dashapps/src/components/ModalDialog.tsx
  • example-apps/dashapps/src/components/ProvenanceIcon.tsx
  • example-apps/dashapps/src/components/RegistryViews.tsx
  • example-apps/dashapps/src/components/SettingsView.tsx
  • example-apps/dashapps/src/components/SignInForm.tsx
  • example-apps/dashapps/src/components/StarMeter.tsx
  • example-apps/dashapps/src/dash/categoryLabel.ts
  • example-apps/dashapps/src/dash/client.ts
  • example-apps/dashapps/src/dash/contract.ts
  • example-apps/dashapps/src/dash/contractFacts.ts
  • example-apps/dashapps/src/dash/contractStore.ts
  • example-apps/dashapps/src/dash/contractSummaryStore.ts
  • example-apps/dashapps/src/dash/documentWrites.ts
  • example-apps/dashapps/src/dash/endorsementReads.ts
  • example-apps/dashapps/src/dash/endorsementWrites.ts
  • example-apps/dashapps/src/dash/ids.ts
  • example-apps/dashapps/src/dash/keyManager.ts
  • example-apps/dashapps/src/dash/keywordSearch.ts
  • example-apps/dashapps/src/dash/leaderboard.ts
  • example-apps/dashapps/src/dash/loginWithPrivateKey.ts
  • example-apps/dashapps/src/dash/ownerResolver.ts
  • example-apps/dashapps/src/dash/paging.ts
  • example-apps/dashapps/src/dash/ratingReads.ts
  • example-apps/dashapps/src/dash/ratingWrites.ts
  • example-apps/dashapps/src/dash/registryCheck.ts
  • example-apps/dashapps/src/dash/registryReads.ts
  • example-apps/dashapps/src/dash/registryWrites.ts
  • example-apps/dashapps/src/dash/resolveDpnsName.ts
  • example-apps/dashapps/src/dash/sdkCore.ts
  • example-apps/dashapps/src/dash/sdkModule.ts
  • example-apps/dashapps/src/dash/systemContractMetadata.ts
  • example-apps/dashapps/src/dash/types.ts
  • example-apps/dashapps/src/hooks/useDialog.ts
  • example-apps/dashapps/src/hooks/useInlineSignIn.ts
  • example-apps/dashapps/src/hooks/useLeaderboards.ts
  • example-apps/dashapps/src/hooks/useRegistryCheck.ts
  • example-apps/dashapps/src/lib/appDetails.ts
  • example-apps/dashapps/src/lib/detectSecretShape.ts
  • example-apps/dashapps/src/lib/format.ts
  • example-apps/dashapps/src/lib/logger.ts
  • example-apps/dashapps/src/lib/safeDoc.ts
  • example-apps/dashapps/src/lib/urls.ts
  • example-apps/dashapps/src/main.tsx
  • example-apps/dashapps/src/session/SessionContext.tsx
  • example-apps/dashapps/src/session/context.ts
  • example-apps/dashapps/src/session/keyManagerFromKey.ts
  • example-apps/dashapps/src/session/types.ts
  • example-apps/dashapps/src/session/useSession.ts
  • example-apps/dashapps/src/styles.css
  • example-apps/dashapps/src/vite-env.d.ts
  • example-apps/dashapps/test/AppDetails.test.tsx
  • example-apps/dashapps/test/AppRatings.test.tsx
  • example-apps/dashapps/test/DpnsName.test.tsx
  • example-apps/dashapps/test/ExternalLaunch.test.tsx
  • example-apps/dashapps/test/HeaderAccount.test.tsx
  • example-apps/dashapps/test/Leaderboard.test.tsx
  • example-apps/dashapps/test/RegistryViews.test.tsx
  • example-apps/dashapps/test/SignInForm.test.tsx
  • example-apps/dashapps/test/StarMeter.test.tsx
  • example-apps/dashapps/test/app.test.tsx
  • example-apps/dashapps/test/contractSchema.test.ts
  • example-apps/dashapps/test/contractSummaryStore.test.ts
  • example-apps/dashapps/test/documentWrites.test.ts
  • example-apps/dashapps/test/e2e/browse.spec.ts
  • example-apps/dashapps/test/e2e/detail.spec.ts
  • example-apps/dashapps/test/e2e/discover.spec.ts
  • example-apps/dashapps/test/e2e/fixtures.ts
  • example-apps/dashapps/test/e2e/ratings.spec.ts
  • example-apps/dashapps/test/e2e/settings.spec.ts
  • example-apps/dashapps/test/e2e/signed-in.spec.ts
  • example-apps/dashapps/test/e2e/signin.spec.ts
  • example-apps/dashapps/test/e2e/smoke.spec.ts
  • example-apps/dashapps/test/endorsementReads.test.ts
  • example-apps/dashapps/test/endorsementWrites.test.ts
  • example-apps/dashapps/test/format.test.ts
  • example-apps/dashapps/test/helpers.ts
  • example-apps/dashapps/test/ids.test.ts
  • example-apps/dashapps/test/leaderboard.test.ts
  • example-apps/dashapps/test/logger.test.ts
  • example-apps/dashapps/test/loginWithPrivateKey.test.ts
  • example-apps/dashapps/test/ownerResolver.test.ts
  • example-apps/dashapps/test/ratingReads.test.ts
  • example-apps/dashapps/test/ratingWrites.test.ts
  • example-apps/dashapps/test/reads.test.ts
  • example-apps/dashapps/test/registryCheck.test.ts
  • example-apps/dashapps/test/registryReads.test.ts
  • example-apps/dashapps/test/registryWrites.test.ts
  • example-apps/dashapps/test/sdk-types.test.ts
  • example-apps/dashapps/test/session.test.tsx
  • example-apps/dashapps/test/storage-and-names.test.ts
  • example-apps/dashapps/test/useLeaderboards.test.tsx
  • example-apps/dashapps/tsconfig.app.json
  • example-apps/dashapps/tsconfig.json
  • example-apps/dashapps/tsconfig.node.json
  • example-apps/dashapps/vite.config.ts
  • example-apps/dashnote/src/dash/loginWithPrivateKey.ts
  • example-apps/token-ops/src/dash/loginWithPrivateKey.ts
  • scripts/check-shared-auth-parity.sh

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@thephez

thephez commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

@thepastaclaw review

@thepastaclaw

thepastaclaw commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 33bc430) · triage: critical · ad hoc (no repo skill)

@thepastaclaw thepastaclaw left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 2 only (queue backlog)

Updated after discussion: 2 finding(s) of this review were settled in the inline threads; 8 blocking finding(s) still stand.

  • ⚖️ Disputed (left to the maintainers): 🔴 A custom registry can label a listing Official without the target owner's endorsement
  • ✅ Withdrawn: 🔴 App details omit the contract-declared description and keywords

Changes requested: 10 8 blockers

  • Local signed-in tests can send a wallet recovery phrase to a server they did not start — example-apps/dashapps/playwright.config.ts:35 (new)
    Impact: When a developer runs the suite with PLATFORM_MNEMONIC set and another process serves the expected page on port 5187, that page receives the developer's recovery phrase.
  • A custom registry can label a listing Official without the target owner's endorsement — example-apps/dashapps/src/dash/registryCheck.ts:26-30 (new) — settled: ⚖️ Disputed (left to the maintainers)
    Impact: A visitor using a registry with weaker endorsement rules can see a publisher's URL attributed to a contract owner who never endorsed it.
  • Switching registries leaves the previous registry's listings in Search and Discover — example-apps/dashapps/src/App.tsx:1278-1287 (new)
    Impact: A visitor who switches registries on the same network can still find or launch a listing supplied only by the registry they left.
  • A failed endorsement refresh can mark a revoked publisher's new link Official — example-apps/dashapps/src/components/RegistryViews.tsx:509-520 (new)
    Impact: A visitor opening an app from a previously loaded Discover feed can see a former delegate's revised URL described as chosen by the contract owner.
  • Saving a stale listing editor silently overwrites a newer edit — example-apps/dashapps/src/dash/registryWrites.ts:163-179 (new)
    Impact: A publisher who edits the same listing in two tabs can lose the first tab's changes when the second saves, even when the changes affect different fields.
  • Publishers can pay to save an app URL that DashApps will not open — example-apps/dashapps/src/dash/registryWrites.ts:56-59 (new)
    Impact: A publisher who saves an HTTP app URL spends testnet credits on a listing advertised as launchable, but visitors cannot continue to its destination.
  • Name-prefix search stops after the first 25 listings — example-apps/dashapps/src/App.tsx:218-224 (new)
    Impact: A visitor searching a common prefix cannot reach later name matches unless they happen to appear through another search source.
  • App details omit the contract-declared description and keywords — example-apps/dashapps/src/App.tsx:561-578 (new) — settled: ✅ Withdrawn
    Impact: A visitor inspecting a listed app cannot compare what the contract owner declared with what a registry publisher wrote.
  • Pressing Enter in the launch dialog opens the card's details instead — example-apps/dashapps/src/components/ExternalLaunch.tsx:53-56 (new)
    Impact: A keyboard user launching from an interactive Discover or category card can press Enter on Continue or Cancel and be taken to the detail view instead.
  • A failed personal-review lookup leaves the editor stuck on “Checking” — example-apps/dashapps/src/components/AppRatings.tsx:323-327 (new)
    Impact: A signed-in reviewer whose personal lookup fails cannot write or edit a review from that page, even if the public ratings loaded correctly.

PR #127 adds DashApps, a testnet registry example for discovering Platform contracts, publishing listings, endorsing publishers, and posting reviews using protocol v14. The reported build, unit, shared-auth parity, and read-only checks passed; the write suites were skipped, the reported Playwright job was for Dashnote rather than DashApps, and the review check was pending. Ten additional verified suggestions were omitted under the comment limit.

🔴 10 8 blocking

Review provenance

Source: reviewer 1: gpt-6.2-astra (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 3: gpt-6.2-astra (agent: phase2-reviewer, role: security-auditor); reviewer 4: gpt-6.2-astra (agent: phase2-reviewer, role: general); reviewer 5: gpt-6.2-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.2-astra (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)

  • Ad hoc review: this repository has no PastaClaw review skill; reviewers used generic guidance and the repository's own conventions
  • Triage: critical by gpt-6.2-sol (effort low) — This large change adds browser-side WIF key handling in example-apps/dashapps/src/dash/loginWithPrivateKey.ts and uses the resulting signing credentials for on-chain registry writes.
  • Phase 1 reviewers: not run (skipped for throughput: 12 PRs queued, above the 10 limit)
  • Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
  • Fresh verifier: gpt-6.2-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-astra — general (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — platform-versioning (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — security-auditor (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — general (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — platform-versioning (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — security-auditor (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.

In `example-apps/dashapps/playwright.config.ts`:
- [BLOCKING] example-apps/dashapps/playwright.config.ts:35: Local signed-in tests can send a wallet recovery phrase to a server they did not start
  Impact: When a developer runs the suite with `PLATFORM_MNEMONIC` set and another process serves the expected page on port 5187, that page receives the developer's recovery phrase.
  The test hands the recovery phrase to the page before checking that sign-in worked. Outside CI, `reuseExistingServer` lets Playwright use an existing listener on port 5187, while `signed-in.spec.ts` automatically reads the phrase from the environment or repo-root `.env` and injects it after checking only page content. Disabling traces protects the report, not the page receiving the secret. Have Playwright start this checkout's server and fail if the port is already occupied.

In `example-apps/dashapps/src/dash/registryCheck.ts`:
- [BLOCKING → DISPUTED; left to the maintainers, do not fix] example-apps/dashapps/src/dash/registryCheck.ts:26-30: A custom registry can label a listing Official without the target owner's endorsement
  Impact: A visitor using a registry with weaker endorsement rules can see a publisher's URL attributed to a contract owner who never endorsed it.
  The badge and launch dialog claim the target contract's owner chose the listing, but the compatibility check only verifies three document type names. A registry can retain the expected fields and indices while omitting `appEndorsement.contractId.refersTo.contractRequirements.owner: "self"`. A valid proof then establishes that the endorsement exists, not that its author owns the target; the feed and detail paths use `publisherId` without making that ownership comparison. Verify the endorsement author against the proven target owner before granting Official status, or establish the equivalent authorization guarantees in the selected schema. Cover both feed and detail with a readable registry that lacks the owner restriction.

In `example-apps/dashapps/src/App.tsx`:
- [BLOCKING] example-apps/dashapps/src/App.tsx:1278-1287: Switching registries leaves the previous registry's listings in Search and Discover
  Impact: A visitor who switches registries on the same network can still find or launch a listing supplied only by the registry they left.
  Selecting registry B does not stop DashApps from showing listings from registry A. `SessionViews` caches Discover entries by network, so changing `registryGeneration` remounts `Browser` without clearing the parent cache. Going straight from Settings to Search merges A's cached entries into B's results even after B's name query succeeds; Discover also renders A's launch links while B loads and can retain them if the feed read fails. Scope cache reads and writes to both network and registry ID, and test switching directly to Search without visiting Discover in between.
- [BLOCKING] example-apps/dashapps/src/App.tsx:218-224: Name-prefix search stops after the first 25 listings
  Impact: A visitor searching a common prefix cannot reach later name matches unless they happen to appear through another search source.
  Search gives no way to request later name matches. `searchEntriesByName` returns an `EntryPage` with a continuation cursor, but the caller extracts only `entries`. Show more uses only the Keyword Search cursor, and every `more` call disables the name query. For a two-character prefix, only the name query runs, so there is never a Show more button. Track separate cursors for the two sources and merge each next page by contract. Add a name-only test with a distinct match on page two.
- [BLOCKING → WITHDRAWN in discussion; do not fix] example-apps/dashapps/src/App.tsx:561-578: App details omit the contract-declared description and keywords
  Impact: A visitor inspecting a listed app cannot compare what the contract owner declared with what a registry publisher wrote.
  The detail page does not show the side-by-side metadata comparison promised by the PR. About chooses the listing's description or the Keyword Search short description, and its chips are listing tags. The fetched `detail.description` is only a fallback heading and `detail.keywords` is never rendered; the separate Keyword Search document is not a substitute for either. Render the declared description and keywords in a labeled contract section, separate from the listing and the Keyword Search result or error. Test with distinct descriptions for all three sources.

In `example-apps/dashapps/src/components/RegistryViews.tsx`:
- [BLOCKING] example-apps/dashapps/src/components/RegistryViews.tsx:509-520: A failed endorsement refresh can mark a revoked publisher's new link Official
  Impact: A visitor opening an app from a previously loaded Discover feed can see a former delegate's revised URL described as chosen by the contract owner.
  The detail hero can pair a fresh URL with stale authorization. `inspect` seeds `officialPublisher` from Discover. If the owner then withdraws the endorsement and the former delegate updates their listing, a successful listings read can return that updated entry first. When the concurrent endorsement read fails, `onPreferredEntry` installs the fresh entry but `onOfficialPublisher` is not called, so the old publisher ID still makes the new URL Official. Update the listing and its provenance together, and treat a failed endorsement read as unknown rather than retaining a positive badge. Test a successful listing refresh paired with a rejected endorsement read.

In `example-apps/dashapps/src/dash/registryWrites.ts`:
- [BLOCKING] example-apps/dashapps/src/dash/registryWrites.ts:163-179: Saving a stale listing editor silently overwrites a newer edit
  Impact: A publisher who edits the same listing in two tabs can lose the first tab's changes when the second saves, even when the changes affect different fields.
  A stale editor can overwrite a committed change without a conflict. The form starts from `args.entry` and submits every field, but `editMetadata` assigns the freshly fetched revision plus one instead of checking the revision the form was based on. The replacement can therefore pass Platform's revision check with stale values. Compare the current revision with the one captured when the editor opened and ask the publisher to reload on mismatch. Pass the same expected revision through review saves, which also replace all fields after refetching the latest record.
- [BLOCKING] example-apps/dashapps/src/dash/registryWrites.ts:56-59: Publishers can pay to save an app URL that DashApps will not open
  Impact: A publisher who saves an HTTP app URL spends testnet credits on a listing advertised as launchable, but visitors cannot continue to its destination.
  The editor can successfully save a URL that the launch dialog will always block. `normalizeUrl` and the registry's `appUrl` pattern accept HTTP, and Discover treats a nonempty `appUrl` as launchable, but `ExternalLaunch` renders Continue only for HTTPS. Keep the HTTPS boundary, explain it in the editor, and reject non-HTTPS app URLs before create or replace submits a paid transition. Use the same check when deciding which existing listings to advertise as launchable.

In `example-apps/dashapps/src/components/ExternalLaunch.tsx`:
- [BLOCKING] example-apps/dashapps/src/components/ExternalLaunch.tsx:53-56: Pressing Enter in the launch dialog opens the card's details instead
  Impact: A keyboard user launching from an interactive Discover or category card can press Enter on Continue or Cancel and be taken to the detail view instead.
  The confirmation controls lose their default keyboard action because React key events bubble through the portal to the parent card. The dialog backdrop stops clicks but not keydowns, and both the featured card and `Entry` call `preventDefault()` and open details on Enter. Stop key propagation at the dialog boundary or restrict the card shortcut to events targeting the card itself. Test Enter on both confirmation controls, not just Escape.

In `example-apps/dashapps/src/components/AppRatings.tsx`:
- [BLOCKING] example-apps/dashapps/src/components/AppRatings.tsx:323-327: A failed personal-review lookup leaves the editor stuck on “Checking”
  Impact: A signed-in reviewer whose personal lookup fails cannot write or edit a review from that page, even if the public ratings loaded correctly.
  The review editor stays disabled with no error or retry after the personal lookup has settled. The `Promise.allSettled` handler records a public-summary error but turns a rejected `ownRating` into `own: undefined`, the same state used while loading. The write controls require `own !== undefined`, so the page continues to say “Checking for your rating…”. Track the personal lookup failure separately and offer a retry while keeping writes disabled until the app knows whether a review exists.
Out-of-scope follow-up suggestions (2)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Dashnote and TokenOps can reuse a local server for credential-bearing tests — Both existing Playwright configurations reuse a local listener outside CI, and both sign-in helpers enter a recovery phrase into the served page. These configurations and helpers are unchanged by this PR.
    • Follow-up: Open a follow-up PR that requires both suites to start their own servers and fail on an occupied port when running credential-bearing tests.
  • Dashnote can retain and upload traces from mnemonic entry — Dashnote's existing sign-in helper passes the mnemonic to Playwright's fill, while its configuration retains failure traces and its workflow uploads test results. Those paths are unchanged by this PR.
    • Follow-up: Open a follow-up PR disabling traces for credential-bearing specs, audit retained artifacts, and rotate the test credential if it was exposed.

Comment thread example-apps/dashapps/src/App.tsx Resolved
Comment thread example-apps/dashapps/src/App.tsx Resolved
Comment thread example-apps/dashapps/src/App.tsx Resolved
Discover's cached entries are scoped to the registry they came from, so
Search no longer shows the previous registry's apps. A failed
endorsement read clears the Official badge instead of keeping the one
seeded from Discover. Listing and review edits are refused when the
network has a newer revision than the editor opened with. App URLs must
use HTTPS, and only HTTPS ones offer Launch. Key presses in the launch
dialog no longer reach the card behind it. A failed lookup of your own
review shows an error with Try again instead of checking forever.

Playwright now loads the repo .env through dotenv, as the sibling apps do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
thephez and others added 3 commits November 24, 2026 16:58
A review editor opened with no review now refuses to replace one saved
in the meantime, while the duplicate-create recovery still replaces.
Revision checks use the same default as the reads. A failed read of
your own listing hides Edit, an unknown endorsement shows no provenance
label, and Launch buttons use the URL they already checked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Guest runs still reuse a running dev server outside CI, but a run with
PLATFORM_MNEMONIC set starts its own and fails if the port is taken, so
the phrase is never typed into a server the run didn't start.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Name matches keep their own cursor, so Show more continues whichever
search still has another page. A second app past the first page of
listings for a popular name is now reachable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thephez

thephez commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

@thepastaclaw review

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Changes requested: 2 blockers

  • A review save can overwrite a concurrent submission or republish a withdrawn review — example-apps/dashapps/src/dash/ratingWrites.ts:160-161 (new; not shown inline, see below)
    Impact: A signed-in testnet reviewer using the same identity in two sessions can overwrite the first session’s committed stars and text or pay to republish a review they withdrew.
  • Show more removes the partial-results warning without recovering the missing matches — example-apps/dashapps/src/App.tsx:248-252 (new; not shown inline, see below)
    Impact: A visitor paging through name matches after the keyword lookup fails sees the results count without any warning that it excludes keyword-only matches.
    Not counted: 1 disputed blocking finding(s) left to maintainers.

New on this head: This head adds name-search pagination, hardens listing and review saves, scopes Discover’s cache by registry, and updates launch controls and signed-in Playwright setup. The test and build checks passed; write suites were skipped, DashApps’ live Playwright suite is not run by its CI workflow, and the review check is pending.

🔴 2 blocking

2 finding(s) not shown inline (GitHub refused the PR diff as too large)

🔴 Blocking: A review save can overwrite a concurrent submission or republish a withdrawn review
Impact: A signed-in testnet reviewer using the same identity in two sessions can overwrite the first session’s committed stars and text or pay to republish a review they withdrew.
example-apps/dashapps/src/dash/ratingWrites.ts:160-161

The editor can submit a different operation from the one the reviewer chose. If two first-review forms both submit while ownRating still returns no review, the unique index rejects the losing create with 40105. The new recovery call clears the revision: null precondition and replaces the winning document; the updated race test explicitly expects that replacement. In the other direction, if a reviewer opens Edit, removes the review in another session, and then clicks Save changes, ownRating returns nothing and the save falls through to documents.create despite carrying a concrete revision. If a new review already occupies that slot at the same revision, the revision-only check can instead overwrite that different document. Make the editor’s precondition determine the operation: a first review is create-only and a duplicate is a conflict; an edit must match the original document ID and revision. Add tests that assert no fallback write in each case.

Confirmed by an independent pass: If a testnet reviewer submits first-review drafts for the same app from two signed-in tabs and both lookups see no review, the later create can hit the unique-index conflict and then overwrite the review that just committed. If the reviewer removes a review in one tab and clicks Save changes in a still-open editor in the other, the save republishes the withdrawn review.

source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.2-astra (phase2-reviewer: general, platform-versioning, security-auditor)

🔴 Blocking: Show more removes the partial-results warning without recovering the missing matches
Impact: A visitor paging through name matches after the keyword lookup fails sees the results count without any warning that it excludes keyword-only matches.
example-apps/dashapps/src/App.tsx:248-252

A normal 3–50-character query can return a name page with a continuation while the independent keyword lookup times out. The first page correctly warns that the results are partial. With the new separate cursors, clicking Show more runs only the name query: the failed keyword lookup supplied no cursor. Promise.allSettled treats the skipped lookup as fulfilled with undefined, so a successful name page clears the warning even though no keyword results were fetched. Track failures per source and clear each only when that source succeeds or a new search starts. Test an initial partial failure followed by a successful page from the other source.

Confirmed by an independent pass: A user searches for a 3–50-character term whose name matches span multiple pages, and the keyword lookup times out while the first name page succeeds. When the user clicks Show more and the next name page succeeds, the partial-results warning disappears even though the keyword lookup was not retried and keyword-only matches are still missing.

source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.2-astra (phase2-reviewer: general, platform-versioning, security-auditor)

Follow-up candidates (optional) (1)

New non-blocking observations on code unchanged since the last full review. No inline threads are opened for them and later reviews do not repeat them: fix forward or track separately if they are worth it.

🟡 Suggestion: The launch dialog says a link was not endorsed when the endorsement check failed
Impact: A visitor launching a fallback listing after an endorsement lookup fails is told the contract owner did not endorse it, even though DashApps could not determine that.
example-apps/dashapps/src/App.tsx:484-489

The detail badge now correctly stays hidden when the refreshed publisher is undefined, but Launch passes only verified={official}. ExternalLaunch treats false as proof that the owner did not endorse the URL, so a failed read and a confirmed negative get the same message. Keep the conservative interstitial, but distinguish an unknown endorsement from a confirmed negative, or use wording such as “DashApps did not verify an endorsement for this link” that is accurate in both cases.

source: gpt-6.2-astra (phase2-reviewer: general, platform-versioning, security-auditor)

Review provenance

Source: reviewer 1: gpt-6.2-astra (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 3: gpt-6.2-astra (agent: phase2-reviewer, role: security-auditor); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)

  • Ad hoc review: this repository has no PastaClaw review skill; reviewers used generic guidance and the repository's own conventions
  • Triage: critical by gpt-6.2-sol (effort low) — This large, intricate change adds browser-side private-key login in example-apps/dashapps/src/dash/loginWithPrivateKey.ts and uses those keys to sign registry writes, directly changing key-handling and signing surfaces.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (lane failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • New since the last final review (eb7d6fa6): 2 new blocker(s) went to an independent confirmation pass (the final verifier's model in a fresh session, without its reasoning): 2 confirmed; 1 suggestion(s) on unchanged code listed as follow-up candidates
  • Fresh verifier: gpt-6.2-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-astra — general (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — platform-versioning (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — security-auditor (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.

In `example-apps/dashapps/src/dash/ratingWrites.ts`:
- [BLOCKING] example-apps/dashapps/src/dash/ratingWrites.ts:160-161: A review save can overwrite a concurrent submission or republish a withdrawn review
  Impact: A signed-in testnet reviewer using the same identity in two sessions can overwrite the first session’s committed stars and text or pay to republish a review they withdrew.
  The editor can submit a different operation from the one the reviewer chose. If two first-review forms both submit while `ownRating` still returns no review, the unique index rejects the losing create with 40105. The new recovery call clears the `revision: null` precondition and replaces the winning document; the updated race test explicitly expects that replacement. In the other direction, if a reviewer opens Edit, removes the review in another session, and then clicks Save changes, `ownRating` returns nothing and the save falls through to `documents.create` despite carrying a concrete revision. If a new review already occupies that slot at the same revision, the revision-only check can instead overwrite that different document. Make the editor’s precondition determine the operation: a first review is create-only and a duplicate is a conflict; an edit must match the original document ID and revision. Add tests that assert no fallback write in each case.

  _Confirmed by an independent pass: If a testnet reviewer submits first-review drafts for the same app from two signed-in tabs and both lookups see no review, the later create can hit the unique-index conflict and then overwrite the review that just committed. If the reviewer removes a review in one tab and clicks Save changes in a still-open editor in the other, the save republishes the withdrawn review._

In `example-apps/dashapps/src/App.tsx`:
- [BLOCKING] example-apps/dashapps/src/App.tsx:248-252: Show more removes the partial-results warning without recovering the missing matches
  Impact: A visitor paging through name matches after the keyword lookup fails sees the results count without any warning that it excludes keyword-only matches.
  A normal 3–50-character query can return a name page with a continuation while the independent keyword lookup times out. The first page correctly warns that the results are partial. With the new separate cursors, clicking Show more runs only the name query: the failed keyword lookup supplied no cursor. `Promise.allSettled` treats the skipped lookup as fulfilled with `undefined`, so a successful name page clears the warning even though no keyword results were fetched. Track failures per source and clear each only when that source succeeds or a new search starts. Test an initial partial failure followed by a successful page from the other source.

  _Confirmed by an independent pass: A user searches for a 3–50-character term whose name matches span multiple pages, and the keyword lookup times out while the first name page succeeds. When the user clicks Show more and the next name page succeeds, the partial-results warning disappears even though the keyword lookup was not retried and keyword-only matches are still missing._

Comment thread example-apps/dashapps/src/App.tsx Resolved
Comment thread example-apps/dashapps/src/App.tsx Resolved
thephez and others added 2 commits November 24, 2026 19:00
A first review only creates: an existing review, or a duplicate on
create, asks the reviewer to reload instead of replacing it. An edit
only replaces the review it opened, at the revision it opened, so a
removed review is never re-created.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Show more may run only one of the two searches, so a failure stays
noted until the search that failed loads again or a new search starts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thephez

thephez commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

@thepastaclaw review

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Nothing blocks: no blocking finding stands on this head.
Not counted: 1 disputed blocking finding(s) left to maintainers.

New on this head: DashApps now keeps the partial-search warning visible when Show more pages only the other search source. Review saves stay bound to the original document ID and revision, and a duplicate first submission reports a conflict instead of switching to an edit. CI passed the test-and-build checks, the root read-only suite, shared-auth parity, and Dashnote’s read-only smoke/settings E2E check; write checks were skipped.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: gpt-6.2-astra (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 3: gpt-6.2-astra (agent: phase2-reviewer, role: security-auditor); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)

  • Ad hoc review: this repository has no PastaClaw review skill; reviewers used generic guidance and the repository's own conventions
  • Triage: critical by gpt-6.2-sol (effort low) — The change is large and adds key handling in example-apps/dashapps/src/dash/loginWithPrivateKey.ts and src/session/SessionContext.tsx, where browser-supplied WIF keys and recovery phrases are used to authorize signed Platform writes.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (lane failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.2-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-astra — general (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — platform-versioning (completed, effort high); agent phase2-reviewer, gpt-6.2-astra — security-auditor (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

Not approved: 1 blocking finding(s) are disputed and left to the maintainers.

@thephez
thephez merged commit bc031b2 into main Nov 24, 2026
10 checks passed
@thephez
thephez deleted the feat/dashapps-v14 branch November 24, 2026 21:06
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.

2 participants