Conversation
This pull request introduces several improvements and updates to both the UI and documentation of the fairy agent framework, as well as enhancements to internationalization support. The most significant changes include a refactor and expansion of the fairy agent documentation to clarify architecture and mode/state management, updates to the cookie consent banner animation and interactivity, and the addition of new translation strings for better i18n coverage. **Documentation and Architecture Improvements** * Major rewrite and expansion of `CONTEXT.md` for the fairy agent system, clarifying the manager pattern, agent lifecycle, mode/state machine, prompt composition, action pipeline, chat history, and supported actions. The documentation now uses more consistent terminology and details new manager classes and their responsibilities. [[1]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L11-R35) [[2]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L42-R68) [[3]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L66-R89) [[4]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L89-R108) [[5]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L99-R132) [[6]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L145-R168) [[7]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L162-R233) [[8]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04R244-R248) [[9]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04R275-R282) [[10]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L304) [[11]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04R322) [[12]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L332-R334) [[13]](diffhunk://#diff-bd44e83bf83d55a658e5305f7b463a2c1a9a3a9a6e744488079ce50d19755f04L353-R355) **UI/UX Enhancements** * The cookie consent banner animation duration is reduced from 5s to 3s, and pointer events are disabled during the animation and enabled after completion, preventing premature interaction. [[1]](diffhunk://#diff-46b6cf1efce9be49a39ec28015467f21b8de9cb4534d19590916a6c69e13ba60R20-R24) [[2]](diffhunk://#diff-3c0f417f2d83bbdc18d2bd4a86e0749bf6d7df0f066101f955fa0be419ab1684L48-R50) **Internationalization (i18n) Updates** * Added new translation keys and strings to both compiled and source English locale files, including "Introduction", "Debug fairies", "About", "Debug", "Open", and "Usage", improving coverage for new features and UI elements. [[1]](diffhunk://#diff-172557233305d8563de0969a2f73486aaafa7f44e657aebd4664797a492ac730R78-R83) [[2]](diffhunk://#diff-172557233305d8563de0969a2f73486aaafa7f44e657aebd4664797a492ac730R642-R647) [[3]](diffhunk://#diff-172557233305d8563de0969a2f73486aaafa7f44e657aebd4664797a492ac730R930-R935) [[4]](diffhunk://#diff-172557233305d8563de0969a2f73486aaafa7f44e657aebd4664797a492ac730R1112-R1117) [[5]](diffhunk://#diff-172557233305d8563de0969a2f73486aaafa7f44e657aebd4664797a492ac730R1310-R1315) [[6]](diffhunk://#diff-172557233305d8563de0969a2f73486aaafa7f44e657aebd4664797a492ac730R1334-R1339) [[7]](diffhunk://#diff-00aff287a2ba64df0ac85108a2a353c57dbd6ff2fcf0af506a371533b0ae27ecR38-R40) [[8]](diffhunk://#diff-00aff287a2ba64df0ac85108a2a353c57dbd6ff2fcf0af506a371533b0ae27ecR290-R292) [[9]](diffhunk://#diff-00aff287a2ba64df0ac85108a2a353c57dbd6ff2fcf0af506a371533b0ae27ecR416-R418) [[10]](diffhunk://#diff-00aff287a2ba64df0ac85108a2a353c57dbd6ff2fcf0af506a371533b0ae27ecR500-R502) [[11]](diffhunk://#diff-00aff287a2ba64df0ac85108a2a353c57dbd6ff2fcf0af506a371533b0ae27ecR570-R572) [[12]](diffhunk://#diff-00aff287a2ba64df0ac85108a2a353c57dbd6ff2fcf0af506a371533b0ae27ecR582-R584)Describe what your pull request does. If you can, add GIFs or images showing the before and after of your change. ### Change type - [ ] `bugfix` - [ ] `improvement` - [ ] `feature` - [ ] `api` - [x] `other` ### Test plan 1. Create a shape... 2. - [x] Unit tests - [ ] End to end tests ### Release notes - Fixed a bug with… <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds an Offset action with extensive tests, improves fairy mobile interactions and HUD/manual UI, updates sprites/remote rendering, emits editor resize events, tweaks cookie consent and i18n, and adds TS profiling scripts. > > - **Fairies (core/actions)** > - Add `OffsetActionUtil` and wire into action registry/schema; introduce `createAgentActionInfo/createAgentTask` helpers. > - Refactor many action utils to use `createAgentActionInfo`. > - Ensure page sync only for complete actions in `FairyAgentActionManager.act`. > - Large unit test suite for action utils (align/bring-to-front/change-page/create/delete/distribute/fly-to-bounds/label/move/move-position/pen/place/resize/review/rotate/send-to-back/stack/think/update). > - **Mobile/interaction fixes** > - Improve fairy dragging: dispatch pointer moves on capture, initialize editor inputs, and use `originPagePoint`; ThrowTool uses origin for correct mobile positioning. > - **UI/HUD** > - Add manual panel with tabs (Introduction/Usage/About), state persisted; sidebar/manual button with context menu and debug/reset options; header "select all" button on mobile; menu tweaks (close chat, selection options). > - **Sprites/remote rendering** > - Update `FairySprite` API (required `tint`/colors), propagate to poses; improve shadow in dark theme; use `FAIRY_CONTAINER_SIZE` and animate remote sprites only when active/selected. > - **Editor** > - Emit `resize` event and expose in `TLEventMap`; update canvas HTML transforms. > - **Dotcom** > - Cookie consent: shorter slide-up, pointer-events disabled during animation and enabled after; mobile auth dialog CSS tweaks. > - Show fairies UI for guests; add user setting for "Debug fairies"; new i18n strings (Introduction/Usage/About/Open/Debug...). > - **Tooling** > - Add TypeScript profiling scripts (`profile-typescript`, `profile-tsserver`) and `.ts-profile` handling; eslint script arg fix. > - **Docs** > - Major rewrite/expansion of fairy system `CONTEXT.md`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 68cf17e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Lu[ke] Wilson <l2wilson94@gmail.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Steve Ruiz <steveruizok@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
Adds comprehensive event tracking for fairy-related UI interactions to enable analytics and usage insights. ### Change type - [x] `improvement` ### Test plan 1. Open a document with fairies enabled 2. Interact with fairies (select, drag, chat, etc.) 3. Verify events are tracked in analytics ### Release notes - Added event tracking for fairy UI interactions including selection, messaging, project management, navigation, and panel state changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds analytics tracking to key fairy interactions (select/drag/chat/follow/sleep/project, etc.), extends app UI event schema/sources, and updates a strict-mode test expectation. > > - **Analytics instrumentation (fairy)**: > - Add `useTldrawAppUiEvents` to `fairy` components to track interactions: selection/multi-select (`fairy-select`, `fairy-add-to-selection`, `fairy-deselect`, `fairy-select-all`), drag/long-press (`fairy-drag-start`, `fairy-panic`), navigation (`fairy-zoom-to`, `fairy-summon`, `fairy-summon-all`, `fairy-follow`, `fairy-unfollow`), chat (`fairy-send-message`, `fairy-cancel-generation`, `fairy-reset-chat`, `fairy-reset-all-chats`), state (`fairy-sleep`, `fairy-sleep-all`, `fairy-wake`), UI/panel (`fairy-switch-to-manual`, `fairy-close-manual`, `fairy-switch-manual-tab`, `click-fairy-teaser`), and projects (`fairy-start-project`, `fairy-disband-group`). > - Updated files: `fairy/Fairy.tsx`, `fairy-ui/hud/FairyHUDHeader.tsx`, `fairy-ui/FairyHUDTeaser.tsx`, `fairy-ui/hud/FairySingleChatInput.tsx`, `fairy-ui/hud/useFairySelection.ts`, `fairy-ui/menus/FairyMenuContent.tsx`, `fairy-ui/project/FairyProjectView.tsx`. > - **Event schema**: > - Extend `TLAppUiEventSource` and `TLAppUiEventMap` in `tla/utils/app-ui-events.tsx` with new fairy sources and events. > - **Tests**: > - Relax strict assertion in `packages/tldraw/src/test/TldrawEditor.test.tsx` for `onMount` under React StrictMode. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c91ea34. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )