Skip to content

refactor: remove internal/layout/Engine (ADR-032 CACHE-030)#163

Merged
kolkov merged 1 commit into
mainfrom
chore/cache-030-031-cleanup
Jul 5, 2026
Merged

refactor: remove internal/layout/Engine (ADR-032 CACHE-030)#163
kolkov merged 1 commit into
mainfrom
chore/cache-030-031-cleanup

Conversation

@kolkov

@kolkov kolkov commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove internal/layout/Engine — centralized layout cache with 0 production usage (confirmed by codebase audit). Per-widget layout caching is now fully handled by widget.LayoutChild on WidgetBase (ADR-032 Phase 2b, #160).

-769 lines of dead code removed.

Changes

  • Delete engine.go + engine_test.go
  • Extract Layoutable interface to layoutable.go (still used by Flex/Grid/Stack)
  • Extract mockLayoutable to mock_test.go (still used by layout tests)
  • Remove Engine cache benchmarks from bench_test.go
  • Update doc.go: remove Engine references, add LayoutChild note
  • Update CHANGELOG

Test plan

  • go build ./...
  • go test ./... -count=1 (all pass)
  • golangci-lint run --timeout=5m (0 issues)
  • CI green

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…ACHE-030)

Engine (centralized layout cache) has 0 production usage — confirmed by
codebase audit. Per-widget layout caching is now handled by
widget.LayoutChild on WidgetBase (ADR-032 Phase 2b, #160).

- Delete engine.go + engine_test.go (-769 LOC)
- Extract Layoutable interface to layoutable.go (used by Flex/Grid/Stack)
- Extract mockLayoutable to mock_test.go
- Remove Engine cache benchmarks from bench_test.go
- Update doc.go and CHANGELOG
@kolkov
kolkov force-pushed the chore/cache-030-031-cleanup branch from 18341e6 to e5a9175 Compare July 5, 2026 10:26
@kolkov
kolkov merged commit 91e8bdf into main Jul 5, 2026
9 checks passed
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