Branch: ai/mouse-consumers
Depends on: step-05 (candy-mouse)
Blocks: β
Migrate sugar-veil, sugar-crumbs, and candy-lister from external candy-zone Manager wiring to self-contained candy-mouse Scanner per consumer.
Reference: Β§387.4 (mouse-tracking reinvention), Β§369.4 (consolidation).
sugar-veil/composer.jsonΒ·sugar-crumbs/composer.jsonΒ·candy-lister/composer.jsonβ addsugarcraft/candy-mouseviapath-repo-closure. Keep the existingsugarcraft/candy-zonedep β candy-zone's other features (Manager for other purposes) may still be needed; only the mouse-tracking surface migrates.sugar-veil/src/Veil.phpβ replaceManager $managerfield with ownScanner. UpdatewithManager()accordingly (keep the method, mark @deprecated, delegate internally).sugar-crumbs/src/Breadcrumb.phpβ same pattern as sugar-veil withzoneManagerfield.candy-lister/src/(wherever mouse-tracking happens, if at all) β same.
- Each of the 3 libs has internal Scanner; no external Manager wiring required.
- Existing
withManager()/withZoneManager()methods preserved as deprecated wrappers (back-compat). - All existing mouse-handling tests in the 3 libs pass.
- β₯95 % coverage maintained in each.
-
git statusclean on master.
- path-repo closure: candy-mouse in all 3.
- Per lib: introduce a private
Scannerfield; on render, doScanner::scan($renderedString); on mouse event, doScanner::hit($x, $y)to look up the zone. - Back-compat: keep
withManager(Manager)etc. methods; mark@deprecated; internally bridge to Scanner (or simply ignore β Manager's role is replaced). - Run phpunit in 3 libs + dependents.
- For each lib: simulate a click at coords inside / outside known zones; assert the right zone is reported.
- Back-compat: call
withManager(new Manager())β should not throw, lib continues to work using the internal Scanner.
- Each lib's README:
## Shared foundationsmentioning candy-mouse, with a note that external Manager wiring is no longer needed. - Each lib's CALIBER_LEARNINGS: "Mouse hit-testing self-contained via candy-mouse. Don't pass Managers around for new code."
- PR title:
sugar-veil + sugar-crumbs + candy-lister: self-contained mouse via candy-mouse - PR body:
## Summary - Three libs migrate from candy-zone external Manager wiring to candy-mouse self-contained Scanner. - Each lib owns its Scanner; mouse hit-testing is local. - withManager() / withZoneManager() kept as deprecated back-compat wrappers. - No external candy-zone Manager required for mouse-only use cases. ## Test plan - [x] vendor/bin/phpunit in sugar-veil / sugar-crumbs / candy-lister (β₯95% each) - [x] Back-compat: withManager() still callable - [x] php tools/check-path-repos.php Refs: docs/repo_map_step_22.md, docs/repo_map_update.md Β§369.4, Β§387.4 - Commit subject:
sugar-veil + sugar-crumbs + candy-lister: adopt candy-mouse.