Skip to content

fix(macos): degrade fullscreen detection capability to false (F03/F28)#29

Merged
rsecss merged 1 commit into
mainfrom
fix/macos-fullscreen-degrade
May 23, 2026
Merged

fix(macos): degrade fullscreen detection capability to false (F03/F28)#29
rsecss merged 1 commit into
mainfrom
fix/macos-fullscreen-degrade

Conversation

@rsecss

@rsecss rsecss commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Closes F03 (P0) + F28 (P3) from docs/.local/v1.0.0-audit-report.mddegrade-only fix for v0.7.0. Real macOS fullscreen detection is deferred to v0.7.x follow-up per prd.md §五 risk table. Epic sub-branch #5 of 9.

detect_fullscreen_macos always returned DegradedFalse (no real NSWorkspace / CGWindowList impl), yet PlatformApi reported fullscreen-detection capability as true. UI toggle appeared functional but did nothing.

What changed

  • PlatformApi::supports_fullscreen_detection(&self) -> bool added
    • macOS: false
    • Windows: true
    • Linux: true on X11 + session present; false on Wayland
  • DetectorCapabilities gains fullscreen_detection_supported: bool (ts-rs regenerated)
  • SettingsPage.svelte disables the "Fullscreen Skip" toggle + swaps description to a new i18n note (settings.behavior.fullscreenUnsupported) when capability is false
  • .trellis/spec/backend/platform-storage.md synced (trait + capability matrix + degradation principle)

Tests (all green)

  • Rust: supports_fullscreen_detection_returns_false_on_macos, fullscreen_active_stays_false_when_capability_off, capability_reflects_unsupported_fullscreen_detection
  • Frontend: 2 new SettingsPage tests covering disabled/enabled toggle states
  • Result: Rust 189 passed; Vitest 99 passed across 15 files; coverage 88.86% lines / 85.59% functions (above 80/70 gate)
  • Local npm run ci all 8 steps pass

NOT done in this PR (deferred to v0.7.x)

  • Real macOS fullscreen detection (NSWorkspace activeApplication / CGWindowListCopyWindowInfo bounds vs Spaces / multi-display)
  • v0.7.x action: implement detect_fullscreen_macos to return Detected(bool), flip capability to true, remove the v0.7.x i18n note

Constraints honored

Audit context

Part of v0.7.0 hardening epic — see .trellis/tasks/05-23-v0-7-0-hardening-release-epic/prd.md. Concurrent: #3 refactor/remove-defensive-code (background).

🤖 Generated with Claude Code

`detect_fullscreen_macos` has always returned `DegradedFalse` (no real
NSWorkspace / CGWindowList implementation), yet `PlatformApi` claimed to
support fullscreen detection. The "Fullscreen Skip" toggle in Settings
therefore appeared functional on macOS but did nothing.

This is the v0.7.0 degrade-only fix for sub-branch #5 of the
v0.7.0-hardening epic. Real macOS fullscreen detection is deferred to
v0.7.x follow-up per prd.md §五 risk table.

Changes:
- Add `supports_fullscreen_detection(&self) -> bool` to PlatformApi.
  - macOS: returns false (capability gates UI off).
  - Windows: returns true.
  - Linux: returns true on X11 with a session, false on Wayland.
- Extend DetectorCapabilities with fullscreen_detection_supported field;
  ts-rs binding regenerated.
- Disable the "Fullscreen Skip" toggle in SettingsPage when capability
  is false; description swaps to a new i18n note pointing at v0.7.x.
- New zh-CN/en string: settings.behavior.fullscreenUnsupported.
- Add unit tests on macos.rs (capability=false, behavior stays false)
  and detector.rs (capability reflects unsupported fullscreen).
- Add 2 Svelte tests covering disabled/enabled toggle states.
- Sync .trellis/spec/backend/platform-storage.md trait + matrix +
  degradation principle.

Not done in this PR (left to v0.7.x):
- Real macOS fullscreen detection (NSWorkspace / Spaces / multi-display).

Refs: docs/.local/v1.0.0-audit-report.md F03, F28
Epic: v0.7.0 hardening (sub-branch #5 of 9)
@rsecss rsecss merged commit 2e94465 into main May 23, 2026
6 checks passed
@rsecss rsecss deleted the fix/macos-fullscreen-degrade branch May 23, 2026 12:55
@rsecss rsecss mentioned this pull request May 23, 2026
4 tasks
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