Commit 059450e
committed
feat(linear): prefix-route multi-workspace issue lookup by team key
Closes #96.
The screenshot processor's findLinearIssueByIdentifier scanned every
active workspace until one returned a hit. Cheap for 1-2 workspaces, but
wasteful for stacks onboarding several Linear workspaces.
Cache each workspace's team keys (e.g. ['ABCA', 'PLAT']) on the registry
row at install time. The lookup now prefix-matches the identifier's team
key (ABCA-42 -> ABCA) and queries that workspace first; iterates the rest
only on miss or when team_keys is absent (legacy rows / stale cache).
- linear-issue-lookup.ts: split into prefix-match + fallback-iterate
- cli/commands/linear.ts: queryLinearTeamKeys helper, called from setup
and add-workspace; team_keys persisted on registry row
- DynamoDB schemaless — no CDK schema change. Legacy rows back-fill on
next 'bgagent linear setup' / 'add-workspace' re-run.1 parent e791e62 commit 059450e
2 files changed
Lines changed: 94 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 76 | + | |
79 | 77 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
93 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
| |||
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
| 111 | + | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
| |||
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
117 | 150 | | |
| 151 | + | |
118 | 152 | | |
119 | 153 | | |
120 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
626 | 630 | | |
627 | 631 | | |
628 | 632 | | |
| |||
633 | 637 | | |
634 | 638 | | |
635 | 639 | | |
| 640 | + | |
636 | 641 | | |
637 | 642 | | |
638 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
639 | 648 | | |
640 | 649 | | |
641 | 650 | | |
| |||
975 | 984 | | |
976 | 985 | | |
977 | 986 | | |
| 987 | + | |
| 988 | + | |
978 | 989 | | |
979 | 990 | | |
980 | 991 | | |
| |||
985 | 996 | | |
986 | 997 | | |
987 | 998 | | |
| 999 | + | |
988 | 1000 | | |
989 | 1001 | | |
990 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
991 | 1007 | | |
992 | 1008 | | |
993 | 1009 | | |
| |||
1634 | 1650 | | |
1635 | 1651 | | |
1636 | 1652 | | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
1637 | 1687 | | |
1638 | 1688 | | |
1639 | 1689 | | |
| |||
0 commit comments