Skip to content

feat(swift-window-pool): swift: floatingpetwindowpool + updated livepollingdriver [P13.04]#134

Closed
cesarnml wants to merge 7 commits into
agents/p13-03-swift-rpgstatereader-expected-state-schema-version-8from
agents/p13-04-swift-floatingpetwindowpool-updated-livepollingdriver
Closed

feat(swift-window-pool): swift: floatingpetwindowpool + updated livepollingdriver [P13.04]#134
cesarnml wants to merge 7 commits into
agents/p13-03-swift-rpgstatereader-expected-state-schema-version-8from
agents/p13-04-swift-floatingpetwindowpool-updated-livepollingdriver

Conversation

@cesarnml

Copy link
Copy Markdown
Owner

Summary

  • delivery ticket: P13.04 Swift: FloatingPetWindowPool + updated LivePollingDriver
  • ticket file: docs/product/delivery/phase-13/ticket-04-floating-pet-window-pool.md
  • stacked base branch: agents/p13-03-swift-rpgstatereader-expected-state-schema-version-8
  • post-verify: outcome clean completed at 2026-06-28 11:41 UTC
  • subagentReview: outcome skipped completed at 2026-06-28 11:50 UTC

cesarnml added 6 commits June 28, 2026 18:12
…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.
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codogotchi Ready Ready Preview, Comment Jun 28, 2026 12:03pm

@cesarnml cesarnml deleted the branch agents/p13-03-swift-rpgstatereader-expected-state-schema-version-8 June 28, 2026 23:37
@cesarnml cesarnml closed this Jun 28, 2026
@cesarnml cesarnml deleted the agents/p13-04-swift-floatingpetwindowpool-updated-livepollingdriver branch June 28, 2026 23:37
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