Repository navigation
feat(sync): add searchable attachment API foundation - #839
Conversation
ld-ahartmann
left a comment
There was a problem hiding this comment.
not diving too deep but all looks reasonable here
171d01b to
d49b3db
Compare
d49b3db to
47f099b
Compare
47f099b to
c33b971
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit c33b971. Configure here.
| model.rebuildList(page.offset > 0) | ||
| if page.offset > 0 { | ||
| model.list.Select(previousCount) | ||
| } |
There was a problem hiding this comment.
Load-more cursor can go out of range
Low Severity
After a Load more fetch, receivePage always moves the cursor to previousCount, including when the new page is empty. hasMore treats a missing totalCount as unknown and offers Load more on a full page, so the last page can request another page, get zero items, drop the Load more row, and leave Index() past the end of the list. SelectedItem() then returns nil and Enter does nothing.
Reviewed by Cursor Bugbot for commit c33b971. Configure here.


Context
This stack adds support for attaching LaunchDarkly tools and skills to prompt variations that are synchronized with repository files. This first layer adds the API and interactive search behavior the rest of the stack builds on. It does not write attachment files or change how variations are reconciled yet.
What changes
Review focus
Verification
go test ./internal/sync/api ./internal/sync/interactive ./internal/sync/bootstrap ./internal/sync/link ./internal/sync/promptgo test ./...git diff --checkRelated changes
Review the stack in this order:
Note
Overview
Adds server-paginated catalog and attachment APIs on the unified sync
Client, plus a reusableSearchSelectTUI so bootstrap and link no longer fetch entire project/config lists up front.Catalog:
Projects/Configsfull-list helpers andCatalogClientare removed in favor ofSearchProjectsandSearchConfigsreturningPage[T]withlimit,offset, and APIfilterstrings (including config mode filters used when linking by prompt mode).Attachments: New domain types (
Tool,Skill,Attachment,AttachmentRef) and API methods to search, read, create (tools only), and patch tools/skills. Tool search re-fetches each hit so results reflect the latest version; mutations send empty fields/collections to clear remote values. SharednewResourceMutationError/IsNotFoundsupport later reconciliation.Interactive UX: Slash-triggered search, “Load more,” alt-screen forms, taller lists, and clearer Key: labels in choice descriptions.
Reviewed by Cursor Bugbot for commit c33b971. Bugbot is set up for automated code reviews on this repo. Configure here.