aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-28 10:24:21 -0500
committerCraig Jennings <c@cjennings.net>2026-05-28 10:24:21 -0500
commite5a07739c5b58b041bcb7192eae35a2c4d98bce3 (patch)
treea424567f5c6acef8ce7d0b2494c3cb250abf8e08 /docs
parent7939a598bc1f2e045dd4d4fe9e5dc4b7437147d5 (diff)
downloadpearl-e5a07739c5b58b041bcb7192eae35a2c4d98bce3.tar.gz
pearl-e5a07739c5b58b041bcb7192eae35a2c4d98bce3.zip
refactor(view-sync): pick-scope returns (display . plist), drops rassoc lookup
pearl-sync-saved-query-to-linear used to rebuild the entire scope-candidates list a second time (full sort + 2N row allocations) just to rassoc the chosen scope plist back to its display string for the success message. The picker had thrown away the display string the user picked, so the caller had no choice but to re-derive it. I changed pearl--sync-saved-query-pick-scope to return (DISPLAY . PLIST) instead of just PLIST. The caller now reads scope-label from (car scope-pair) and scope from (cdr scope-pair). The rassoc is gone, and so is the second pearl--sync-scope-candidates call. To keep the re-sync path label-consistent with the picker (so a "Synced X (Team: Engineering, visible to the team)" message matches what the picker would have shown for the equivalent first-time sync), I extracted pearl--sync-scope-label as the single source of truth for the label format. The picker, the re-sync branch, and any future caller that needs to describe a scope all go through the helper. Personal scope always renders "[ Personal, only I see it ]" regardless of the shared flag (a Personal + shared combination is meaningless on Linear). Team scopes render "[ Team: NAME, visible to the team ]" or "[ Team: NAME, only I see it ]" per the flag. I added five tests covering the new behavior: scope-label for personal (ignores shared) and team (both shared and private), pick-scope returns the team pair, pick-scope returns the personal pair, pick-scope returns nil on cancel. All 668 ert tests pass. make compile and make lint are clean.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions