Explorer — redeem cart + skills/tools redeem & optimistic add - #571
Merged
Conversation
… Add-to-Sofia Explorer — coachmark onboarding tour (first Privy login), 11 steps over the real UI: Explore, Circles → open a circle → what's inside, Compose + compile actions, Cart, Profile → Scores/backers (view details + per-topic backers), and the browser extension. Spotlight uses a box-shadow scrim (backdrop-filter cutouts don't composite reliably here) with a clickable hole; steps advance on real route/DOM interaction. Triggered by useExplorerOnboarding (localStorage flag sofia:explorer-onboarding-done), portaled from App.tsx, with data-tour anchors on nav items + circle cards. Extension — right-click "Add to Sofia" while disconnected now opens the Sofia side panel to connect: modal pre-checks wallet status (new ADD_TO_SOFIA_STATUS message) and swaps its CTA to "Connect to Sofia", sending open_sidepanel synchronously to preserve the user gesture. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ier spotlight, backers CTA - Split Explore into nav + a "community feed" step that opens a wide hole over .page-content so the Explore page content is actually visible. - Measure the spotlight target immediately + via MutationObserver (no more lag when a target — e.g. a circle hero — renders after navigation). - Tighten the spotlight padding and make the /scores step insist on clicking a topic to reveal its backers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ics) Merge the Mark page's two pickers (verb + context) into one multi-select combobox following the "Categorisation Sidepanel" design (option 2a): closed field with removable chips, search, alphabetical checklist with verbs (lucide icons) + topics (drill-down categories), footer count/clear. - New CategorisationDropdown component + CSS; verb selection derived from the cart (multi-select) instead of a single active pick. - Unify the tag look across the side panel: ink text + colored icon + tighter radius, driven by --verb-color. Chips reuse the DS .fc-verb-tag class; extension-scoped theme override keeps the explorer feeds intact. - Verbs + topics sorted A->Z in the dropdown. - Add verb icons to the cart basket rows (WeightBasketRow). - Rename: "Actions on this page" -> "Tags on this page", Validate -> Save, placeholder -> "Add a tag"; retarget the onboarding tour accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Sign button was disabled for a redeem-only cart because `totalDeposit <= 0` treats "zero deposit" as "nothing to do" — but a redeem legitimately deposits nothing (it recovers TRUST). Gate that guard on `!hasRedeem` and stop showing a misleading "0 T" amount. After a successful redeem the cart invalidated the profile query, which refetched ~1s post-tx while the indexer still reported the position — it re-cached the stale row and re-persisted it, so the card reappeared on reload. Replace the invalidate with an optimistic `removeCertsFromProfileCache`: the tx passed, so drop the cert locally and let staleTime reconcile once the indexer catches up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner-only trash button on each confirmed skill/tool chip (mirrors the Context Manager's UntaggedCertCard). Clicking queues a redeem of the declaration triple's stake into the cart — same MultiVault.redeem flow as URL certs, reusing useRedeemCert with the chip's on-chain termId. Extend the optimistic post-redeem removal to the attributes cache (removeAttributesFromCache, twin of removeCertsFromProfileCache) so a redeemed chip vanishes on tx confirm and stays gone on reload instead of racing the indexer. WeightModal filters both caches per redeemed termId; the non-matching one is a no-op. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
redeemAtom read shares only on the Linear curve (1n) and returned
{success:true} with no tx when they were 0 — the UI then showed a phantom
"Transaction validated" with no wallet popup and optimistically dropped the
item. Scan Linear then Progressive (2n, the extension's regular-deposit
curve) and redeem whichever holds the shares; flag a genuine 0-share case
as noop so WeightModal reports "Nothing to redeem" instead of a fake success
and skips the cache drop.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Declaring a skill/tool now surfaces the chip the instant the create tx confirms (addAttributesToCache, scoped to the owner's cache key) instead of waiting on the indexer. userAttributes is excluded from the immediate post-mint refresh so a pre-index refetch can't wipe the optimistic chip; the scheduled refetches reconcile the real termId/count. Freshly-minted atoms stay type "Unknown" with a null label until Intuition's Thing resolver catches up, which previously dropped the skill from the panel (getAttributeByLabel(null) → undefined). Resolve such atoms by their pinned IPFS Thing name as a fallback, so the chip persists through the lag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The userAttributes query returned every [you → uses/is_skilled_in → X] triple the profile is the subject of, regardless of the owner's stake. Since a triple lives on-chain forever, a redeemed skill/tool reappeared on the next refetch — undoing the optimistic removal. Filter as_subject_triples to those where the owner holds a position with shares > 0, so redeem is a permanent removal and a freshly-staked declaration still shows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explorer — redeem cart + skills/tools redeem & optimistic add
Fixes the redeem/cart flow on the profile Context Manager and brings the same
"delete = redeem" affordance to the Skills & Tools panel, plus optimistic UI.
Redeem cart
Signbutton was gated ontotalDeposit <= 0, which treats a redeem (deposits nothing, recovers TRUST)as "nothing to do". Gate on
!hasRedeem; stop showing a misleading0 T.invalidateQueriesrefetch that raced the indexer and re-persisted the stale row.
redeemAtomonly read Linear (1n) shares andreturned a phantom "validated" (no wallet popup) when they were 0. Scan Linear
then Progressive (2n) and redeem where the stake lives; a true 0-share case is
reported as "Nothing to redeem".
Skills & Tools
Manager — queues a redeem of the declaration's stake.
confirms, before the indexer catches up; scoped to the owner's cache.
type: "Unknown"witha null label until Intuition's Thing resolver catches up (which used to drop
the skill from the panel). Resolve such atoms by their pinned IPFS Thing name.
[you → uses/is_skilled_in → X]triple regardless of stake, so a redeemedskill/tool reappeared on refetch. Filter to positions with
shares > 0soredeem is a permanent removal.
Config note (not in this diff)
Creating any new atom (skills/tools/circles) requires
VITE_PIN_PROXY_URLin theexplorer env and the pin-proxy's
PIN_ALLOWED_ORIGINSto include the callerorigin (e.g.
http://localhost:5173for dev) — otherwisepinThing403s.🤖 Generated with Claude Code