Repository navigation
feat(slack): give the PR and workers context-bar items distinct icons - #39276
Conversation
The PR item, the Create PR action and the Workers item all showed Slack's hierarchy icon, so the bar could not tell them apart. The PR and Create PR now use link and the Workers item uses life-ring, as named constants, and a test pins every item's icon.
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This only swaps icon values. The PR and Workers items no longer share Notes
What this change shipsInventory (5 items) — 3 justifiedIntent: in a Slack code channel, the PR item and the Workers item should be easy to tell apart at a glance. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] c762440 Description read[DESCRIPTION-READ] d34586f98fc0888c0614ad4c0f21467822125ec4381ac7c02562edcee6b3e481 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: two icon values in a Slack payload change, both from Slack's documented set, and the change is easy to revert. Notes
[DESIGN-REVIEWED] c762440 Description read[DESCRIPTION-READ] 507cf51943d650150fd4230766ed05b2ed21df57ab3f3e630ec43f7e4b63869c That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Replies to the non-blocking review notes:
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved. On this head the review checked these points. Both new icons (link, life-ring) are in ICONS, so _unique() and conforms() still keep the PR, Create PR and Workers items. Only context_bar.py builds these items, and no code branches on an icon value. No test expectation still uses hierarchy. The spec row in slack-gateway.md matches the code.
Done well: the new test pins every icon as an exact string and checks icons["pr"] != icons["workers"] directly, so reverting the change turns it red.
- Optional: the PR item and "Open in dashboard" now both use
linkand can sit in the same bar. A PR icon no other built-in item uses (for examplecode) would keep them apart. - Optional:
PR_ICON,CREATE_PR_ICONandWORKERS_ICONeach have one consumer. The other built-in icons are plain literals. - Optional: the last assertion in
test_each_bar_item_has_its_own_pinned_iconrepeats whattest_every_bar_is_within_the_documented_limitsalready checks.
Problem / Motivation
Goal: In a Slack code channel, the context bar's PR item and Workers item each get their own icon instead of both showing
hierarchy.The PR item (
PR #42 is open · tests passing), the Create PR action and the Workers item (1 working · ...) all used thehierarchyicon, so the two look the same in the bar.Why it matters
People reading a code channel cannot tell the PR item from the Workers item at a glance.
Not a goal
What changed (motivation → approach → change)
Both items used the literal
"hierarchy". The icons are now named constants insrc/kiro_crew/slack/code_channels/workspace/context_bar.py, with the values the user chose from Slack's fixed set:PR_ICON = "link"for the PR itemCREATE_PR_ICON = "link"for the Create PR actionWORKERS_ICON = "life-ring"for the Workers itemdocs/system-specs/modules/slack-gateway.mdnow names each bar item's icon.Backwards compatibility
Compatible: only the
iconvalue Slack shows changes; both values are in Slack's documented set (ICONS), whichconformsand_uniquealready check.Removes nothing: no key, item or function is removed; only two icon values change.
Tests
test_each_bar_item_has_its_own_pinned_icon(new): a full bar pins every item's icon (workerslife-ring, repofolder, branchbranch, stopterminal, prlink), the Create PR action'slink, at most five items, every icon inICONS, and that the PR and Workers icons differ.test/test_slack_code_channel_bar_budget.pyandtest/test_slack_code_channel_workspace.pyupdated to the new icons.Manual verification
N/A — unit coverage sufficient: the change is two icon string values in the payload the tests assert verbatim.
Real-machine verification
N/A -- no Slack workspace with code channels is reachable from this environment; the diff only changes icon string values in the context-bar payload, which the unit tests assert exactly.
Related Issues
None.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commitsContribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.