Skip to content

test(ui): share native attachment transfer fixture - #181002

Merged
steipete merged 1 commit into
mainfrom
solid2/w-deslop-final-chat-attachment-tests
Oct 22, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-deslop-final-chat-attachment-tests

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The native file-to-session attachment lifetime tests repeat the same held-download, composer, panel, and menu setup.

User Impact

No production or user-visible change. The same three cases still exercise synchronous cancellation on content or destination replacement and successful attachment after same-turn reparenting.

Why This Change Was Made

A local fixture starts the real native menu action and returns the held download and observed pending-read state. Every behavior assertion remains in its original case, including checking abort and pending-read release before awaiting the replacement render. No production injection hook or test-only export was added.

Test LOC: 153 → 116 (−37). Production LOC delta: 0.

Evidence

Proof Result
pnpm tsgo:ui Passed
Native attachment lifetime suite, one worker 1 file / 3 tests passed
Touched-file lint/format and git diff --check Passed
Independent review Completed before commit
Boot budgets Production source and import graph unchanged; no build needed for this test-only diff
Broader chat performance/retention/UI/Gateway proof ci:full requested

No screenshots: production rendering is unchanged. Both retirement cases and the reparenting-success case remain separate tests; only setup is shared.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 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 22, 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-22T21:28:20.526102Z 74b4ec5 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.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 21:37
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR extracts a shared fixture for native file-to-session attachment lifetime tests.

Example: Attach notes.md, then replace the panel content before its download finishes.

  • Before: Duplicated setup verifies immediate cancellation, balanced pending reads, and no attachment.
  • After: Shared setup preserves those same assertions.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, source-verified test simplification supported by reported harness results; no shipped behavior changes or actionable defects were found.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only refactor changes no shipped behavior; the supplied validation covers the retained native-panel harness.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored cleanup reduces repeated setup without weakening the native bridge cancellation or reparenting contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it removes duplicated test setup while preserving all three lifetime cases, with no actionable findings.

Priority: P3
Reviewed head: 74b4ec5147536c37e482bf7ef77b3011bdff6e49

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI detail panel passes downloaded file bytes to the composer attachment owner; these tests cover cancellation on replacement and survival across same-turn reparenting.

flowchart LR
  A[Shared test fixture] --> B[Native detail panel]
  B --> C[Attach menu action]
  C --> D[Attachment transfer owner]
  D --> E[Held download]
  D --> F[Composer attachments]
Loading

Technical review

Best possible solution:

Retain the local shared fixture and all three distinct lifetime cases without changing production code.

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

No product defect is claimed; source comparison confirms duplicated setup, and the PR reports the retained three-case suite passing.

Is this the best way to solve the issue?

The extraction is appropriately local, preserves the await boundary after starting the transfer, and keeps each distinct behavior assertion in its original case.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Native attachment lifetime test setup keeps the original intent (7d5f4cd: Protect synchronous retirement before replacement publication and preserve transfers during same-turn native panel moves.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit f6580eb adds ui/src/pages/chat/components/chat-file-session-attachment.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f6580eb85f4d; files: ui/src/pages/chat/components/chat-file-session-attachment.ts)

PR surface

Tests -37. Total -37 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 49 86 -37
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 49 86 -37

Labels

Label changes:

  • add P3: This is a focused test-maintenance improvement with no production behavior change.
  • 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:

  • P3: This is a focused test-maintenance improvement with no production behavior change.
  • 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.

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 22, 2026, 5:39 PM ET / 21:39 UTC.

@steipete
steipete merged commit 69d7b2f into main Oct 22, 2026
90 of 91 checks passed
@steipete
steipete deleted the solid2/w-deslop-final-chat-attachment-tests branch October 22, 2026 21:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

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 ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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