Skip to content

fix: skip thread trim during in-flight pagination#9314

Merged
ashleeradka merged 1 commit into
mainfrom
swarm/text-retention-fix/fix-9287
Feb 26, 2026
Merged

fix: skip thread trim during in-flight pagination#9314
ashleeradka merged 1 commit into
mainfrom
swarm/text-retention-fix/fix-9287

Conversation

@ashleeradka
Copy link
Copy Markdown
Contributor

@ashleeradka ashleeradka commented Feb 26, 2026

Summary

Address review feedback on #9287: add !vm.isLoadingMoreMessages to trimPreviousThreadIfNeeded guard to prevent trimForBackground() from corrupting pagination state when user switches threads during a load-more request.

Problem

If a user triggers "load more" pagination then quickly switches threads, trimForBackground() runs while the pagination request is still in-flight, setting isHistoryLoaded = false. When the pagination response arrives, it's misclassified as an initial load instead of a pagination append, corrupting message state.

Fix

One-line change: add !vm.isLoadingMoreMessages to the guard in trimPreviousThreadIfNeeded(nextThreadId:) so that thread trimming is skipped while a pagination request is in flight.

Files Changed

  • clients/macos/vellum-assistant/Features/MainWindow/ThreadManager.swift — Added !vm.isLoadingMoreMessages guard condition

Open with Devin

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ashleeradka ashleeradka self-assigned this Feb 26, 2026
@ashleeradka ashleeradka merged commit b36bb5c into main Feb 26, 2026
1 check passed
@ashleeradka ashleeradka deleted the swarm/text-retention-fix/fix-9287 branch February 26, 2026 01:16
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

noanflaherty pushed a commit that referenced this pull request Feb 26, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
noanflaherty added a commit that referenced this pull request Feb 26, 2026
…canonical send to selectThread (#9361)

* fix(macos): add disabled guard to SwiftUI conversation zoom commands (#9310)

The SwiftUI CommandGroup buttons bypass AppKit's validateMenuItem callback,
so conversation zoom shortcuts (Cmd+/−/0) were always active even on
non-conversation panels. Add .disabled() modifiers matching the existing
isConversationVisible guard.

Co-authored-by: Claude <noreply@anthropic.com>

* feat: reskin Mobile card to match Guardian Verification visual pattern (#9311)

Restructure the Mobile settings card so it uses the same row-based layout
as the Telegram, SMS, and Phone Calling cards:

- Connected devices now display as channelStatusRow entries (icon + name +
  Remove button) instead of the old custom list with bordered buttons
- Device Pairing row uses the 140px guardian-label layout with info tooltip,
  mirroring the Guardian Verification rows in other cards
- Status warnings (no gateway, no token, regenerating) display inline in
  the pairing row rather than as standalone blocks below the button
- "Show QR Code" button renamed to "Pair Device" for consistency
- Removed formattedDeviceDate helper (no longer needed)

Co-authored-by: Claude <noreply@anthropic.com>

* fix: preserve text in stripHeavyContent, add early-return guard (#9313)

Co-authored-by: Claude <noreply@anthropic.com>

* fix: guard trimForBackground against in-flight pagination (#9314)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: omit textSegments when truncated, handle legacy tool results in rehydrate (#9315)

Co-authored-by: Claude <noreply@anthropic.com>

* fix: restore Button semantics for heartbeat run row expansion (#9304)

Replace onTapGesture with Button + contentShape(Rectangle()) to
preserve keyboard activation and VoiceOver accessibility while
keeping the full-row tap target.

* fix: clear isContentStripped after rehydration for re-trim eligibility (#9317)

Co-authored-by: Claude <noreply@anthropic.com>

* fix(macos): use macOS 14-compatible SF Symbol for refresh buttons (#9318)

Replace "arrow.trianglehead.2.counterclockwise" (SF Symbols 6 / macOS 15+)
with "arrow.triangle.2.circlepath" (SF Symbols 1 / macOS 11+) so the
refresh icons on Platform, Gateway, and Tunnel status rows actually render
on macOS 14 (Sonoma).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: positional tool call matching, cache invalidation, contentOrder fix in rehydrate (#9319)

Co-authored-by: Claude <noreply@anthropic.com>

* fix: same-timestamp getNextMessage + separate text truncation flag (#9320)

Co-authored-by: Claude <noreply@anthropic.com>

* fix(macos): improve refresh button UX on Connect status rows (#9321)

- Move refresh icon next to status text instead of right-aligned
- Remove bounce animation when spin stops (use .identity instead of .default)
- Add 0.5s minimum spin duration so the icon always visibly spins

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix(macos): simplify Platform connection error to "Could not connect" (#9324)

Replace verbose error.localizedDescription (e.g. "Could not connect to
the server.") with a concise "Could not connect" in the Platform health
check on the Connect tab.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: fail local hatch if base data directory already exists (#9322)

Prevents accidentally overwriting an existing assistant's data by
checking if the .vellum directory exists before proceeding with hatch.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: populate cachedInputFull on expand via onChange to prevent flash (#9325)

Co-authored-by: Claude <noreply@anthropic.com>

* fix: proper compound cursor for deterministic pagination (#9326)

Co-authored-by: Claude <noreply@anthropic.com>

* fix: prevent pagination timeout from misclassifying late responses (#9327)

Co-authored-by: Claude <noreply@anthropic.com>

* fix(macos): simplify Telegram guardian verification help text into single line (#9328)

Co-authored-by: Claude <noreply@anthropic.com>

* fix(macos): resolve two build errors on main (#9329)

1. Replace .identity animation (unavailable in current Swift) with .default
2. Add public isConversationZoomEnabled accessor so the executable target
   can check conversation visibility without accessing internal members

Co-authored-by: Claude <noreply@anthropic.com>

* fix: remove unused parseFrontmatter function in CLI skills command (#9330)

Co-authored-by: Claude <noreply@anthropic.com>

* feat: add vellum login/logout/whoami commands (#9178)

* feat: add vellum login/logout/whoami commands

Add platform authentication commands to the CLI:
- `vellum login --token <token>` validates and stores a platform session token
- `vellum logout` clears the stored token
- `vellum whoami` shows the currently authenticated user

Token is stored at ~/.vellum/platform-token (same path used by the assistant
daemon), enabling `vel import` to filter assistants by the logged-in user.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use allauth session endpoint instead of removed /v1/users/

The UserViewSet at /v1/users/ was removed from the platform. Switch to
the allauth headless session endpoint (/_allauth/app/v1/auth/session)
which returns user info via X-Session-Token auth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: respect BASE_DATA_DIR and enforce 0600 on existing token files

- Derive platform token path from BASE_DATA_DIR (matching the assistant
  daemon's getRootDir() behavior) instead of hardcoding homedir()
- Call chmodSync after writeFileSync to ensure 0600 permissions even
  when the file already exists (writeFileSync mode only applies on creation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix(macos): fix build errors from cross-module access and invalid Animation member (#9332)

MainWindow and MainWindowState need public access since they're accessed
from the vellum-assistant-app executable target. Also fix .identity
(not a valid Animation member) to .default in SettingsConnectTab.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat: outbound guardian verification via code entry in Settings UI (#9333)

Add submit_outbound_code guardian action so users receive a verification
code via SMS/Telegram/voice call and enter it in the macOS Settings UI
instead of displaying a code to copy. Voice calls now speak the code
(no DTMF required). Existing /guardian_verify command fallback preserved.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* revert #9333 + rework guardian: show code in UI, reply in channel (#9334)

* Revert "feat: outbound guardian verification via code entry in Settings UI (#9333)"

This reverts commit b651371.

* revert #9333 + rework guardian verification: show code in UI, user replies in channel

Reverts the "enter code in UI" approach from #9333 and instead:
- SMS/Telegram outbound messages no longer include the verification code
- Messages ask the user to reply with the code shown in the Vellum app
- Voice verification is unchanged (DTMF via phone call)
- The code is only visible in the trusted Settings UI, not sent over the channel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Changes needed for Vellum Assistant on Mac Mini (#9335)

* feat: accept bare verification codes and simplify guardian verify copy (#9336)

- Accept bare hex/numeric codes as verification replies (no /guardian_verify prefix needed)
- Simplify channel message copy to 'Reply with the code you were given'
- Remove expiry time commentary from verification messages
- Remove guardian_verify from Telegram bot commands
- Update skills and architecture docs to match new flow

Co-authored-by: Claude <noreply@anthropic.com>

* feat: use 6-digit codes for all channels and update verification copy (#9338)

- All channels now use 6-digit numeric verification codes (was 64-char hex for SMS/Telegram)
- SMS/Telegram: 'Vellum assistant guardian verification requested. Reply with the 6-digit code you were given.'
- Voice: 'You are receiving a guardian verification call for your Vellum assistant. Please enter your 6-digit verification code using your keypad.'
- Dropped per-assistant name prefix from templates (now always says Vellum assistant)

Co-authored-by: Claude <noreply@anthropic.com>

* docs: update skills and architecture for 6-digit verification codes (#9339)

Co-authored-by: Claude <noreply@anthropic.com>

* fix: prevent voice/phone call threads from leaking into desktop side nav (#9340)

Voice-bound conversations were appearing in the macOS desktop thread list
after session restore because the filter explicitly allowed sourceChannel=voice.
Guardian verification calls also leaked because they had no channel binding.
Pointer messages set userMessageChannel=voice which contaminated origin channel.

- Remove voice exception from desktop thread filters (restore + pagination)
- Add voice channel binding to guardian verification conversations
- Remove misleading "See voice thread" pointer text and channel metadata

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* docs: align guardian verification copy with create_challenge flow (#9341)

* feat: install CLI symlink during desktop hatch and add --version flag (#9342)

* feat: install CLI symlink during desktop hatch and add --version flag

Creates /usr/local/bin/vellum symlink pointing to the bundled vellum-cli
binary during hatch when VELLUM_DESKTOP_APP is set. This works for both
dev mode (DerivedData) and production (/Applications) builds, complementing
the existing AppDelegate symlink which skips dev mode.

Also adds --version/-v flag support to the CLI entry point.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use lstatSync to handle dangling symlinks during CLI symlink install

existsSync follows symlinks and returns false for broken links, causing
symlinkSync to throw EEXIST on stale symlinks. Now uses lstatSync to
detect and clean up dangling symlinks correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add non-null assertion for Drizzle or() return type in conversation-store (#9351)

Co-authored-by: Claude <noreply@anthropic.com>

* fix: remove unused existsSync import in CLI gcp.ts (#9352)

Co-authored-by: Claude <noreply@anthropic.com>

* fix(notifications): deduplicate conversation-viewed events by moving canonical send to selectThread

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ashlee Radka <ashleeradka@gmail.com>
Co-authored-by: V <vincent@vellum.ai>
Co-authored-by: David Vargas Fuertes <vargas@vellum.ai>
Co-authored-by: siddseethepalli <siddseethepalli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant