Skip to content

Commit 910cbd9

Browse files
max-drakekostyafarbersteveruizokmimecuvalo
authored
feat(fairies): add zodiac signs, viewport movement, and refactorings (tldraw#7238)
This PR adds zodiac sign support for fairies, implements viewport movement controls for agents, and includes comprehensive code quality improvements through refactoring. **Key changes:** - Added zodiac sign generation for fairies with all 12 signs (aquarius, aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, pisces) - Implemented MovePositionAction to allow agents to control their viewport position - Enhanced fairy project view and task management - Added fairy manual panel with improved UI labels and content - Improved max shapes handling on document - Refactored sprite system to use modular components (FairyHatSpritePart, FairyBodySpritePart, FairyWingsSpritePart) - Updated sprite poses and animations with refined timing and visual polish - Improved fairy manager initialization and lifecycle - Standardized module naming: moved files to `fairy-*` namespace convention - Refactored FairyListSidebar to use hook-based entry logic - Replaced useReactor with useQuickReactor in Fairy components for better performance - Added escape key handling to close context menus - Refactored fairy interaction layer with updated rules section ### Change type - [x] `feature` - [x] `improvement` ### Test plan 1. Create a fairy and verify it has a zodiac sign assigned 2. Test agent viewport movement with MovePositionAction 3. Verify fairy project management workflows 4. Test max shapes handling 5. Verify sprite animations and poses render correctly 6. Check that all fairy module imports work correctly after file renames 7. Test escape key handling in context menus 8. Verify performance improvements from useQuickReactor changes - [ ] Unit tests - [ ] End to end tests ### Release notes - Added zodiac sign support for fairies - Added agent viewport movement controls - Improved fairy sprite component modularity and animations - Enhanced fairy manual UI and content - Improved fairy component performance - Standardized fairy module file naming conventions <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Add zodiac signs, agent viewport movement, and a major modular refactor of fairies with new UI/manual, sprites, and performance improvements. > > - **Core/Architecture** > - Introduce manager-based `fairy-agent` (chat, request, mode, position, wait, usage, todo, gesture) and global atoms in `fairy-globals`. > - Replace legacy HUD/menus/sidebar with new `fairy-ui` (hooks, menus, project, manual, chat history). > - Standardize paths to `fairy-*`; remove deprecated components. > - **Actions/Schema** > - Add `MovePositionAction` (move viewport center) and wire to manager. > - Extend focused shapes; disallow image creation via `create`. > - Update mode parts: add `sign` part; tweak prompt flags/rules. > - **Features** > - Add zodiac sign support (`getRandomFairySign`, sign prompt part). > - Feature flag to enable/disable fairies; hide watermark accordingly. > - **UI/UX** > - New Fairy Manual panel; refined labels (“Guide”, “Select/Deselect”, “Go to”, etc.). > - Rebuilt sidebar with hook-based grouping; improved HUD/header/menu/context menu. > - Close context menus on Escape; follow/summon/select-all actions. > - **Sprites/Animations** > - Modular sprite parts (hat/body/wings); new poses (reviewing, panicking) and wing cycles; timing polish. > - **Performance/Behavior** > - Use `useQuickReactor` for position updates; improved pointer interaction and long-press feedback. > - Handle max shapes by interrupting agents; refined wait/notify flows. > - **Tooling/i18n** > - ESLint rule exempts fairy files and blocks `fairy-shared` imports outside. > - Update/enrich locales; add concise menu strings. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d150dbe. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Kostya Farber <kostya.farber@gmail.com> Co-authored-by: Steve Ruiz <steveruizok@gmail.com> Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com>
1 parent 5fa7343 commit 910cbd9

188 files changed

Lines changed: 6246 additions & 5614 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/dotcom/client/public/tla/locales-compiled/en.json

Lines changed: 42 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@
6363
"value": "This file has reached its size limit and changes might no longer be saved. Remove some content or start a new file."
6464
}
6565
],
66+
"0ab1ef22a3": [
67+
{
68+
"type": 0,
69+
"value": "Speak to the group…"
70+
}
71+
],
6672
"0b27918290": [
6773
{
6874
"type": 0,
@@ -123,12 +129,6 @@
123129
"value": "Export as"
124130
}
125131
],
126-
"141c7239d3": [
127-
{
128-
"type": 0,
129-
"value": "Fairy customization"
130-
}
131-
],
132132
"146ffe2fd9": [
133133
{
134134
"type": 0,
@@ -159,18 +159,6 @@
159159
"value": "Today"
160160
}
161161
],
162-
"1fe250ea06": [
163-
{
164-
"type": 0,
165-
"value": "Instruct the group…"
166-
}
167-
],
168-
"20dfc4f904": [
169-
{
170-
"type": 0,
171-
"value": "Locate"
172-
}
173-
],
174162
"23f879f41a": [
175163
{
176164
"type": 0,
@@ -219,12 +207,6 @@
219207
"value": "My files"
220208
}
221209
],
222-
"2db683a1fe": [
223-
{
224-
"type": 0,
225-
"value": "Join selected fairies"
226-
}
227-
],
228210
"30cd34258a": [
229211
{
230212
"type": 0,
@@ -281,12 +263,6 @@
281263
"value": "Please try refreshing the page."
282264
}
283265
],
284-
"33f9ea6fe8": [
285-
{
286-
"type": 0,
287-
"value": "Disband group"
288-
}
289-
],
290266
"34140869c6": [
291267
{
292268
"type": 0,
@@ -317,24 +293,12 @@
317293
"value": "Unfollow"
318294
}
319295
],
320-
"37169d1dc0": [
321-
{
322-
"type": 0,
323-
"value": "Sleep fairies"
324-
}
325-
],
326296
"3903aab323": [
327297
{
328298
"type": 0,
329299
"value": "Follow"
330300
}
331301
],
332-
"3a77f951ca": [
333-
{
334-
"type": 0,
335-
"value": "Add a new task…"
336-
}
337-
],
338302
"3b6c2b4caa": [
339303
{
340304
"type": 0,
@@ -425,6 +389,12 @@
425389
"value": "Name"
426390
}
427391
],
392+
"4c41e0bd95": [
393+
{
394+
"type": 0,
395+
"value": "Select all"
396+
}
397+
],
428398
"4d0d3ddec9": [
429399
{
430400
"type": 0,
@@ -621,16 +591,10 @@
621591
"value": "you"
622592
}
623593
],
624-
"64ebe56d8c": [
594+
"6602bbeb29": [
625595
{
626596
"type": 0,
627-
"value": "Click to remove or drag to move"
628-
}
629-
],
630-
"65709fd250": [
631-
{
632-
"type": 0,
633-
"value": "Task list"
597+
"value": "Guide"
634598
}
635599
],
636600
"6609dd239e": [
@@ -783,12 +747,6 @@
783747
"value": "A fairy is a little guy that can work with you on the canvas. Fairies can work alone or as a team. There is no limit to what a fairy can do. Nobody knows where they came from."
784748
}
785749
],
786-
"7a3113b0ba": [
787-
{
788-
"type": 0,
789-
"value": "Drag to canvas"
790-
}
791-
],
792750
"7b1329f5ca": [
793751
{
794752
"type": 0,
@@ -909,12 +867,6 @@
909867
"value": " .tldr files."
910868
}
911869
],
912-
"86a7df7572": [
913-
{
914-
"type": 0,
915-
"value": "Summon fairies"
916-
}
917-
],
918870
"86c66437fd": [
919871
{
920872
"type": 0,
@@ -993,10 +945,10 @@
993945
"value": "Copied invite link"
994946
}
995947
],
996-
"93dfe9fbbe": [
948+
"94186070ef": [
997949
{
998950
"type": 0,
999-
"value": "Deselect fairy"
951+
"value": "Deselect"
1000952
}
1001953
],
1002954
"94966d9074": [
@@ -1035,12 +987,6 @@
1035987
"value": "Add file link"
1036988
}
1037989
],
1038-
"98e528aac6": [
1039-
{
1040-
"type": 0,
1041-
"value": "Switch to fairy chat"
1042-
}
1043-
],
1044990
"9914a0ce04": [
1045991
{
1046992
"type": 0,
@@ -1127,10 +1073,10 @@
11271073
"value": "Export image"
11281074
}
11291075
],
1130-
"a2f0372a75": [
1076+
"a286d9991c": [
11311077
{
11321078
"type": 0,
1133-
"value": "Switch to task list"
1079+
"value": "Join"
11341080
}
11351081
],
11361082
"a3debabee7": [
@@ -1473,12 +1419,6 @@
14731419
"value": "Theme"
14741420
}
14751421
],
1476-
"d7bc9d5a2e": [
1477-
{
1478-
"type": 0,
1479-
"value": "Delete task"
1480-
}
1481-
],
14821422
"d876a9fe1a": [
14831423
{
14841424
"type": 0,
@@ -1497,6 +1437,12 @@
14971437
"value": "Go here to see the content"
14981438
}
14991439
],
1440+
"d9bfb9789a": [
1441+
{
1442+
"type": 0,
1443+
"value": "Enable fairies"
1444+
}
1445+
],
15001446
"d9e35d0f55": [
15011447
{
15021448
"type": 0,
@@ -1553,6 +1499,12 @@
15531499
"value": "App debug flags"
15541500
}
15551501
],
1502+
"e062622261": [
1503+
{
1504+
"type": 0,
1505+
"value": "Select"
1506+
}
1507+
],
15561508
"e0c88179b3": [
15571509
{
15581510
"type": 0,
@@ -1589,22 +1541,22 @@
15891541
"value": "Terms of service"
15901542
}
15911543
],
1592-
"e81c4e4f2b": [
1544+
"e43ec38a93": [
15931545
{
15941546
"type": 0,
1595-
"value": "or"
1547+
"value": "Go to"
15961548
}
15971549
],
1598-
"ea0626ac5a": [
1550+
"e81c4e4f2b": [
15991551
{
16001552
"type": 0,
1601-
"value": "Danger zone"
1553+
"value": "or"
16021554
}
16031555
],
1604-
"ea181d98ca": [
1556+
"ea0626ac5a": [
16051557
{
16061558
"type": 0,
1607-
"value": "Select fairy"
1559+
"value": "Danger zone"
16081560
}
16091561
],
16101562
"ea4788705e": [
@@ -1663,22 +1615,22 @@
16631615
"value": " to learn more."
16641616
}
16651617
],
1666-
"ef53538ae4": [
1618+
"eee6f05922": [
16671619
{
16681620
"type": 0,
1669-
"value": "Members"
1621+
"value": "Disband"
16701622
}
16711623
],
1672-
"ef7de3f485": [
1624+
"ef53538ae4": [
16731625
{
16741626
"type": 0,
1675-
"value": "selected"
1627+
"value": "Members"
16761628
}
16771629
],
1678-
"efb2d9d471": [
1630+
"ef7de3f485": [
16791631
{
16801632
"type": 0,
1681-
"value": "Todo list"
1633+
"value": "selected"
16821634
}
16831635
],
16841636
"efde983742": [
@@ -1699,12 +1651,6 @@
16991651
"value": "User settings"
17001652
}
17011653
],
1702-
"f23056da60": [
1703-
{
1704-
"type": 0,
1705-
"value": "New project"
1706-
}
1707-
],
17081654
"f2569594b2": [
17091655
{
17101656
"type": 0,
@@ -1729,12 +1675,6 @@
17291675
"value": "Are you sure you want to leave this group?"
17301676
}
17311677
],
1732-
"f7d5ee6855": [
1733-
{
1734-
"type": 0,
1735-
"value": "Select a leader first…"
1736-
}
1737-
],
17381678
"fa2ead697d": [
17391679
{
17401680
"type": 0,
@@ -1747,24 +1687,12 @@
17471687
"value": "Viewer"
17481688
}
17491689
],
1750-
"fd11eafb92": [
1751-
{
1752-
"type": 0,
1753-
"value": "Disband projects"
1754-
}
1755-
],
17561690
"fd1be3efcf": [
17571691
{
17581692
"type": 0,
17591693
"value": "Are you sure you want to delete this file?"
17601694
}
17611695
],
1762-
"fe0a4f9d0a": [
1763-
{
1764-
"type": 0,
1765-
"value": "Clear chats"
1766-
}
1767-
],
17681696
"fed5ec05eb": [
17691697
{
17701698
"type": 0,

0 commit comments

Comments
 (0)