Skip to content

fix(nostr): preserve profile rows across settings refreshes - #182289

Merged
steipete merged 1 commit into
mainfrom
solid2/w-s2-nostr
Oct 24, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-s2-nostr

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Nostr settings rebuilt their fact arrays and the profile helper output on each host snapshot, remounting unchanged channel/profile rows. Render fixed channel facts directly and keep the profile section mounted with stable field names, so refreshed values update the existing DOM. Status classes now use Solid's class object form.

Request admission, cancellation, busy/error/draft state, hidden-modal publication, and the settings-only plugin activation boundary remain with their existing owners. No host internals or new SDK surface are used. The profile image remains keyed by URL so an error-hidden image is retired when the URL changes.

Evidence

Proof Result
Built native plugin, base vs head Configured/name/value node retention: false/false/false → true/true/true; updated text visible; no browser errors
Focused profile.test.tsx, pinned Bun, one worker 13 passed, including row retention plus save/import/validation/timeout/hidden/cancellation coverage
pnpm tsgo:ui and focused Nostr browser typecheck Passed
Targeted oxlint + formatting + git diff --check Passed
Production Knip Inherited: Unused files (1) src/gateway/assistant-human-mentions.ts also fails under the same command on exact base 23db299b15b; no Nostr findings
Independent Codex autoreview, P0–P2 Scoped clean
Plugin builder asset validation Passed; one JS asset, within 4 MiB per-asset / 8 MiB total / 128 asset limits
Native plugin screenshots at 960×1100 Inspected synthetic fixture; before/after profile and form PNGs byte-identical
Nostr browser census / size Before After
Controller host patterns, render effects, TSX raw listeners, DOM queries, JSX classList, hand-written createComponent 0 0
createEffect / untrack / component onCleanup / owner APIs / flush / manual component loaders 0 0
Plain owner AbortSignal listener (paired disposal) 1 1
Native mount projection / ConfigSlot onSettled lifecycle 1 / 1 1 / 1
Snapshot-identity fact/profile lists 2 0
Hand-built status class suffix 1 0
Touched production LOC 354 342
Focused test LOC 237 265
Plugin asset raw bytes 149,369 148,221
Plugin asset gzip bytes 41,487 41,124
Plugin JS assets 1 1

The four production TSX files and coupled reactive modules were audited. Existing save/import flags are authoritative synchronous owner facts; this foreign mount has no retirement handshake, so adding presentation actions would introduce a competing busy lifetime. There are no async render reads, manual lazy component loaders, snapshots/clones in rendering, or context wrapper deviations to migrate. Accounts already use semantic account IDs; profile fields now use the fixed field names. No host boot files changed; the plugin bundle is measured independently, and it shrank by 363 bytes gzip. The shared plugin guard/baselines are owned by the companion W-S2-PLUGINS lane.

Before (built plugin, synthetic profile):

Nostr profile before

After (same synthetic profile):

Nostr profile after

Keep fixed channel facts and profile fields mounted while owner snapshots change. Preserve the existing synchronous request authority and lazy plugin boundary, and compose native status classes with Solid class objects.
@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T06:06:20.006014Z 3fd6145 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added channel: nostr Channel integration: nostr app: web-ui App: web-ui size: S labels Oct 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR preserves Nostr channel and profile DOM rows across refreshed settings snapshots.

Example: A settings refresh changes the profile name from Alice to Refreshed.

  • Before: The Name label and value nodes are replaced.
  • After: The existing nodes remain mounted and the value changes to Refreshed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, focused repair with a meaningful rendering regression test and no identified correctness defect; inspectable behavior evidence is narrower than a shipped Control UI refresh demonstration.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate: inspected screenshots show unchanged native-plugin layout, and its body reports a built-plugin base/head retention comparison; the images alone cannot demonstrate node identity across refreshes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Refreshing Nostr settings unnecessarily replaces displayed channel and profile rows.
Reason: The maintainer-authored direction repairs a concrete rendering invariant with less production code and preserves existing behavior and ownership.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR makes a focused repair to Nostr settings row retention that current main still needs, with no actionable introduced defect found.

Priority: P2
Reviewed head: 3fd6145490a4733193b4cd03e47fd59d83287630

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied screenshots establish layout parity, while the reported built-plugin comparison does not include an inspectable full Control UI refresh trace showing retained node identities.
Agent review details

How this fits together

The Nostr settings plugin consumes host snapshots through its existing synchronous controller and renders channel facts, profile metadata, and the profile editor into the Control UI.

flowchart LR
  A[Host settings snapshots] --> B[Nostr controller]
  B --> C[Presentation signal]
  C --> D[Channel facts]
  C --> E[Profile section]
  C --> F[Profile editor]
  F --> B
Loading

Technical review

Best possible solution:

Retain the plugin's existing controller and render stable channel and profile rows, as this PR does.

Do we have a high-confidence way to reproduce the issue?

Current-main source creates fresh row objects and recomputes profile JSX from refreshed snapshots, matching the reported node replacement; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch removes the identity churn at its presentation owner without introducing caches or changing controller authority, and the added regression checks both node retention and refreshed values.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2924588f01c1.

Provenance checked

  • Nostr channel facts and profile rendering keeps the original intent (0a80f9e: The plugin extraction in refactor(nostr): move channel settings into the plugin #176042 moved the existing settings presentation out of core with no intended visual or backend change; it does not establish the earliest origin of the rendering pattern.)
  • Settings status classes keeps the original intent (0a80f9e: The extracted plugin retained the shared Settings stylesheet contract; the replacement class object preserves the same muted, ok, and danger class outcomes.)
  • Profile regression coverage keeps the original intent (ef726e3: The earlier test cleanup consolidated fixtures while retaining distinct contracts; the added snapshot-retention case covers a separate failure using that existing fixture.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced diff replaces freshly allocated fact rows and the reactive profile-render helper with fixed markup, a mounted component, and stable profile field names; it retains URL-keyed image replacement. (extensions/nostr/browser/profile.tsx:156, 3fd6145490a4)
  • Current main retains the affected implementation: The fetched main and introduction base have identical profile and component implementations, so main still contains the snapshot-derived rows and profile helper this PR repairs. (extensions/nostr/browser/profile.tsx:167, 2924588f01c1)
  • Focused boundary regression: The added test mounts the actual settings view, refreshes its snapshot, and checks retained label/value/public-key nodes alongside updated text; it protects a distinct observable rendering failure. (extensions/nostr/browser/profile.test.tsx:113, 3fd6145490a4)
  • Existing ownership and lifecycle intent: refactor(nostr): move channel settings into the plugin #176042 moved this presentation into the plugin while preserving drafts, request cancellation, translations, and host-owned authenticated HTTP; the current patch respects that boundary. (extensions/nostr/browser/index.tsx:15, 0a80f9e0b10e)
  • Prepared visual evidence inspected: Both downloaded before/after screenshots show the same synthetic Alice profile and unchanged layout; the PR additionally reports a built-plugin base/head comparison changing configured/name/value node retention from false to true. (3fd6145490a4)
  • CI failure classified: The failed PR context check requests authored What Problem This Solves and Evidence headings; its annotation identifies PR-body structure rather than a production or test failure. (3fd6145490a4)

PR surface

Source -12, Tests +28. Total +16 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 71 83 -12
Tests 1 28 0 +28
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 99 83 +16

Labels

Label changes:

  • add P2: This is a localized settings rendering repair with no demonstrated message delivery, persistence, or availability impact.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a localized settings rendering repair with no demonstrated message delivery, persistence, or availability impact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 24, 2026, 2:22 AM ET / 06:22 UTC.

@steipete
steipete merged commit 867161c into main Oct 24, 2026
120 of 125 checks passed
@steipete
steipete deleted the solid2/w-s2-nostr branch October 24, 2026 06:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
…#182289)

Keep fixed channel facts and profile fields mounted while owner snapshots change. Preserve the existing synchronous request authority and lazy plugin boundary, and compose native status classes with Solid class objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: nostr Channel integration: nostr P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant