fix(work-items): resolve names in wi show *_name fields - #14
Open
Liewzheng wants to merge 1 commit into
Open
Conversation
The detail endpoint returns state, labels, and assignees as bare UUIDs (SDK model mismatch, ADR-0003), and show enriched without lookup maps — so state_detail_name held a UUID despite its name. Build the same cached state/member/label maps wi ls uses; on lookup failure the fields fall back to raw UUIDs as before.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Fixes
wi showreturning UUIDs in fields whose names promise readable values:state_detail_namenow holds the state name (colored for the table, plain in JSON)label_names/label_detail_nameshold label namesassignee_namesholds member namesHow
The detail endpoint returns
state/labels/assigneesas bare UUID strings (SDK model mismatch, ADR-0003), andshowenriched without lookup maps. It now builds the same cached state/member/label maps thatwi lsbuilds (state ls/label ls/users ls, all cached — no extra API cost on a warm cache) and passes them to the shared_enrich_work_item. On lookup failure the fields fall back to the previous raw-UUID behavior, so this cannot break resolution paths that previously worked.No interface changes; the fields keep their names and now match what
wi lsproduces.Tests
make check— 182 passed, lint clean. Verified live:wi showon an item with state/labels now yieldsstate_detail_name: "In Progress"andlabel_detail_names: ["fix"]where it previously returned UUIDs.Closes #13