Fleet changelogs · dev.ecs0.net
rdmbair15m5-changelog-20260922-0431-feat-20260904-11-ecsappkit-hosted-status-item

rdmbair15m5-changelog-20260922-0431-feat-20260904-11-ecsappkit-hosted-status-item

Upstreamed RTTy's reference MenuBarStatusItemController into ECSAppKit and ecs0lib as ECS0HostedStatusItemController, providing hosted-SwiftUI status-item support with explicit length control, dynamic fitting-size allocation, VoiceOver accessibility surface, native snapshot verification, and application lifecycle coupling.

Scope & Repositories Touched

Summary of Changes

  1. ECS0HostedStatusItemController (Sources/ECSAppKit/ECS0HostedStatusItemController.swift & Sources/ECS0AppKit/ECS0HostedStatusItemController.swift):
    • Implemented native status item controller hosting arbitrary SwiftUI views inside NSStatusItem.button.
    • Embedded hosted view ECS0StatusItemLabelHostingView overrides isAccessibilityElement = false, accessibilityChildren = [], and hitTest = nil so clicks and VoiceOver focus route directly to statusItem.button.
    • Provided ECS0StatusItemAllocation.length(fittingWidth:hasVisibleContent:) ensuring max(1, ceil(fittingWidth)) allocation when content is present, or NSStatusItem.variableLength when empty, preventing zero-width allocation bugs in menu bars.
    • Added explicit length control override support (length: parameter) for fixed status badges.
    • Built ECS0StatusItemNativeSnapshot capturing geometry, allocation width, fitting width, target/action states, popover configuration, and VoiceOver element hierarchy for reliable headless testing and runtime verification.
    • Integrated ECS0StatusItemApplicationLifecycle for clean application delegate lifecycle pairing (configure, applicationDidFinishLaunching, applicationWillTerminate), eliminating reliance on stateful singletons.
    • Provided optional Liquid Glass styling integration for popover content via ECSUI / ECS0UI.
    • Included full cross-platform stubs for non-macOS platforms.
  2. Unit Test Coverage (Tests/ECSAppKitTests/HostedStatusItemControllerTests.swift & Tests/ECS0LibTests/HostedStatusItemControllerTests.swift):
    • Added 6 comprehensive test suites/cases testing dynamic fitting allocation, explicit length override, VoiceOver accessibility element boundaries, label updates, snapshot stability under repeated installation IDs, and application lifecycle management.
    • Verified that RTTy's acceptance suite contract (MenuBarLabelRenderingTests) is matched exactly.
    • Preserved RTTy's own implementation untouched in apps/RTTy, satisfying acceptance criterion 3 prior to App Store submission.

Verification Evidence

Git Hashes & Remotes

Rollback & Undo