2 Commits

Author SHA1 Message Date
phranck 3fb4944472 Refactor: Move runtime services from RenderContext to EnvironmentValues
- Add ServiceEnvironment.swift with 9 EnvironmentKeys for runtime services
  (stateStorage, lifecycle, keyEventDispatcher, renderCache, preferenceStorage,
  pulsePhase, cursorTimer, focusIndicatorColor, activeFocusSectionID)
- Remove tuiContext, pulsePhase, cursorTimer, focusIndicatorColor, and
  activeFocusSectionID as direct RenderContext properties
- Inject all services through EnvironmentValues in RenderLoop.buildEnvironment()
- Add convenience RenderContext init that accepts TUIContext and auto-injects
  services into the environment
- Simplify isolatedForBackground() to only swap environment values
- Migrate ~49 access sites in ~25 source files from context.tuiContext.X and
  context.pulsePhase/cursorTimer to context.environment.X
- Update 38 test files to use the new convenience init
2026-02-14 13:13:24 +01:00
phranck 7e24f614f6 Refactor: Split large test files for better maintainability
- Split FocusTests.swift (582 lines) into:
  - FocusManagerTests.swift (338 lines)
  - FocusSectionTests.swift (217 lines)
  - FocusStateTests.swift (47 lines)

- Split ModifierTests.swift (547 lines) into:
  - EdgeInsetsTests.swift (72 lines)
  - PaddingModifierTests.swift (103 lines)
  - FrameModifierTests.swift (205 lines)
  - BorderModifierTests.swift (150 lines)
  - BackgroundModifierTests.swift (74 lines)

All 906 tests pass. No test logic changed.
2026-02-09 22:26:39 +01:00