Skip to content

fix(desktop): upload only newly added attachments - #76404

Open
puemos wants to merge 3 commits into
masterfrom
posthog-code/fix-attachment-upload-loaders
Open

fix(desktop): upload only newly added attachments#76404
puemos wants to merge 3 commits into
masterfrom
posthog-code/fix-attachment-upload-loaders

Conversation

@puemos

@puemos puemos commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Problem

Adding another composer attachment restarted the loading state for every existing attachment because the full attachment list was treated as a new upload batch.

Changes

Upload only attachments added since the previous composer change. Per-upload tokens keep overlapping uploads race-safe without global request counters.

Why: Existing attachments should remain settled when another file is attached.

How did you test this code?

  • Added focused tests proving existing attachments are excluded from later uploads and removed attachments can be re-added for retry.
  • Ran the focused Vitest suite, Biome checks, and the desktop build.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

No documentation changes needed.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Codex traced the loader behavior to the composer attachment-change callback and implemented the requested focused fix. No repo-provided skills were invoked.


Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 7e2fad58-f738-4329-bc9f-d7f22ca44b28
@puemos puemos self-assigned this Aug 2, 2026
@trunk-io

trunk-io Bot commented Aug 2, 2026

Copy link
Copy Markdown

✨ Submitted to Merge by @puemos. It will be added to the merge queue once all branch protection rules pass and there are no merge conflicts with the target branch. See more details here.

@github-actions github-actions Bot added the feature/desktop Feature Tag: Desktop label Aug 2, 2026
puemos added 2 commits August 2, 2026 10:38
Generated-By: PostHog Code
Task-Id: 7e2fad58-f738-4329-bc9f-d7f22ca44b28
Generated-By: PostHog Code
Task-Id: 7e2fad58-f738-4329-bc9f-d7f22ca44b28
@puemos
puemos marked this pull request as ready for review August 2, 2026 08:44
@puemos puemos added the stamphog Request AI approval (no full review) label Aug 2, 2026
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team August 2, 2026 08:45
@trunk-io

trunk-io Bot commented Aug 2, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Contained frontend fix to desktop attachment upload state tracking, authored by the owning team with tests added; no risky territory touched and nothing in reviews/comments blocks it.

  • 👍 on the PR from hex-security-app[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 61L, 1F substantive, 82L/2F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1b-small (82L, 2F, single-area, fix)
stamphog 2.0.0b4 .stamphog/policy.yml @ 96e2437 · reviewed head 51739a3

@puemos

puemos commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

/trunk merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature/desktop Feature Tag: Desktop stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant