Skip to content

Never mix the share error with the list error: the retry button must belong to the list read #987

Closed

Description

@Birfy

Symptom

In Sharing → Share with a friend, a failed Share click and a failed list read share one note slot, and the retry link is drawn for any error — so after a failed share the card offers Try again, which does not retry the share: it re-reads the list and, on success, wipes the share's error message.

Where, at main 99cbb1a1 (plugins/social/client.js)

  • One slot: note state :3152; a failed list read writes { tone: 'error' } at :3169; a failed share click writes { tone: 'error' } at :3200; a successful share writes { tone: 'ok' } at :3195.
  • The button is keyed on the tone only: :3226-3228 renders Try again whenever note.tone === 'error', and onClick calls load() — the list reader.
  • load() clears any error note when it succeeds: :3164 setNote(previous => (previous?.tone === 'error' ? null : previous)). So pressing it after a failed share erases the share's own error and does not retry the share.
  • The same coupling reaches the empty state: note?.tone !== 'error' at :3209 suppresses "No friends left to share with" for a share error too, which the list had nothing to do with.

Reviewer's non-blocking on #985 says the same thing; both halves of it (this button, and that gate) are one root cause: the note has no source.

Expected

  • Try again belongs to a failed list read only. A failed share keeps its message, and the button either does not appear or reads Reload the list and is visibly about the list.
  • A successful list read clears only a list error; it never clears a share's error.
  • "No friends left to share with" is suppressed by a list error only.

Acceptance

  1. Red test first: the fake host rejects social/share-with-friend while social/share-friends works — after the click the card must not offer a retry that re-reads the list (or must offer one labelled Reload the list), and a later successful read must not clear the share error. Red on main, green after the fix.
  2. A failed list read still offers a retry, clicking it re-reads, and a successful read clears that error.
  3. The empty-state gate is driven by a list-sourced error only; add the case that keeps it honest (Reviewer's Keep the share list when a read fails or races a revoke (#984) #985 non-blocking: the current note?.tone !== 'error' gate has no test, and the knife is green).
  4. Row keys, the 5s poll (:3177), the [bot?.id] reset (:3172-3180) and the read epoch/seq from The sharing panel claims "No friends left to share with" when a friend list read is stale or fails #984 (:3156-3167) are untouched.
  5. plugins/social suite green; changelog.d/ fragment; docs/subsystems/social.md if the wording changes.

Out of scope

Activity

  1. added
    bugSomething isn't working
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:uiWeb/desktop UI and copy
    on Oct 24, 2026
  2. Birfy commented on Oct 24, 2026

    @Birfy
    CollaboratorAuthor

    Owner: Dev3 (Triage; reassigned by Chief 2026-10-24 — Dev is single-threaded on #986).
    Reviewer: Reviewer

    Line numbers read at main 99cbb1a1; branch from current main.

  3. Birfy commented on Oct 24, 2026

    @Birfy
    CollaboratorAuthor

    Claimed on fix/987-note-source @ 211080c2 — PR #989.

    The note now carries its source: a failed share and a failed friend-list read no longer stand in for each other, the retry belongs to the list read, and a successful read clears only a list error. No core/ file changed, so patches/ds-bot/ is untouched.

  4. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 24, 2026
  5. self-assigned this
    on Oct 24, 2026
  6. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 24, 2026
  7. added 2 commits that reference this issue on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uiWeb/desktop UI and copybugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions