feat(swift-window-pool): swift: floatingpetwindowpool + updated livepollingdriver [P13.04]#134
Closed
Conversation
…orm [green] - FloatingPetWindowPool: @mainactor pool managing one FloatingPetWindowControlling per active origin (own mode) or one shared window (combined mode); TTL dismissal with last-active-window immunity; off-mode filtering - PerPlatformSnapshot: struct carrying perPlatform map + rpgSnapshot - FloatingPetWindowControlling: protocol for pool-injectable window controllers; FloatingPetController conforms - StateJsonReader.readPerPlatformDirectory: groups state.d/ slices by origin, last-writer-wins per group, same 2h staleTTL as readDirectory - LivePollingDriver.applyPerPlatform: optional sink emitting PerPlatformSnapshot on each tick; wired to pool in MenubarApp - MenubarApp: replaces floatingPetController + floatingPetPanelController with FloatingPetWindowPool; factory creates one panel per spawned origin; removes PetStateFanout dependency - MenubarMenu: accepts FloatingPetWindowPool; collapses to single Hide Pet item when activeOrigins.count == 1; expands to per-origin items when count > 1 - Delete PetStateFanout + PetStateFanoutTests - MenuItemsTests: updated for pool-based MenubarMenu API
Finding 1: combined-mode last-active window was unconditionally dismissed in step-8 else-branch regardless of lastActiveWindowKey. Add immunity guard. Finding 2: clock-skewed far-future updated_at could permanently claim lastActiveOrigin after origin disappears. Clamp stateDate to min(raw, now()). Finding 3: whitespace-only origin string bypassed the !isEmpty guard in readPerPlatformDirectory. Use trimmingCharacters(in:.whitespaces) and normalize key. Add testCombinedWindowSurvivesTTLWhenLastActive covering Finding 1. Update ticket-04 Rationale with implementation notes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P13.04 Swift: FloatingPetWindowPool + updated LivePollingDriveragents/p13-03-swift-rpgstatereader-expected-state-schema-version-8cleancompleted at 2026-06-28 11:41 UTCskippedcompleted at 2026-06-28 11:50 UTC