Repository navigation
refactor(slack): remove two Block Kit builders that nothing calls - #25843
Conversation
confirmation_dialog in slack/blocks.py and build_subagent_ack_block in slack/format.py have no caller in src, test, scripts or website, and no export list or dynamic lookup names them. They read as live API that nothing posts. The button handlers in slack/interactions.py and the SUBAGENT_ACK_ACTION_PREFIX constant stay: messages posted earlier can still carry those buttons, and a click must still be answered. Closes #25842
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Neither builder has a caller anywhere in the tree, and the click handlers that answer buttons on earlier messages are kept. [DESIGN-REVIEWED] 1f1a6c9 Description read[DESCRIPTION-READ] 1196957f776346b593fc491aabb2432eebf3a2c37a9997f28068c16dfe6c6fe7 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (2 items) — 2 justifiedIntent: let people reading the Slack modules see only code that runs, by deleting two Block Kit builders nothing calls (a FIX).
[FIRST-PRINCIPLES-REVIEWED] 1f1a6c9 Description read[DESCRIPTION-READ] 85c1a38f15b886b220e3759739bf0919580da259f5e2e3dbd9944e22089c0d83 That sha256 names the PR description this verdict read. 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: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved on behalf of the watch holder (bolichen). Design and First Principles pass on this head (or skipped / author override), UX skipped or pass, no conflict, no open change request.
Problem / Motivation
Goal: Two Slack Block Kit builders that nothing calls are gone from the tree.
confirmation_dialoginsrc/kiro_crew/slack/blocks.pyandbuild_subagent_ack_blockinsrc/kiro_crew/slack/format.pyhave no caller. A reader who finds them assumes something still posts that confirm dialog or that acknowledge button, and has to grep the tree to learn that nothing does.Why it matters
Dead builders look like live API. They cost every reader of the Slack modules a search, and they invite a new caller to copy a shape the product no longer uses.
Not a goal
src/kiro_crew/slack/interactions.pyor toSUBAGENT_ACK_ACTION_PREFIX.What changed (motivation → approach → change)
No caller → delete the dead code → the two functions are removed, and nothing else.
confirmation_dialogsrc/kiro_crew/slack/blocks.pybuild_subagent_ack_blocksrc/kiro_crew/slack/format.pyNeither function was the last user of any import, so no import changes.
The handlers stay on purpose.
mc_stop_confirmandmc_stop_cancelnear line 280 ofsrc/kiro_crew/slack/interactions.py, and theSUBAGENT_ACK_ACTION_PREFIXbranch near line 243, answer clicks on buttons with those action ids. Slack keeps every message the gateway posted earlier, so an old message can still carry one of those buttons, and its click must still get an answer.Backwards compatibility
Compatible: no runtime path called either function, so nothing that works today stops working.
Reader: src/kiro_crew/slack/interactions.py:dispatch -- chat -- still routes mc_stop_confirm, mc_stop_cancel and subagent_ack_ clicks from earlier messages, and reads SUBAGENT_ACK_ACTION_PREFIX, which stays; test_slack_interactions_coverage.py::test_subagent_ack_marks_matching_notification
Tests
No new test: the change removes code that nothing runs. The proof is the caller search, plus the related suites passing:
git grep -n "confirmation_dialog\|build_subagent_ack_block"oversrc,test,scriptsandwebsitefinds only the two definitions; thewebsitehits are an unrelated i18n key.__all__or_EXPORTS, nothing star-imports them, and nogetattrorimport_modulenames them.kiro_crew.slack.blocksorkiro_crew.slack.format, plustest/test_slack_interactions_coverage.py: 2,692 passed. black, isort, flake8, mypy and the line-cap check pass.Manual verification
N/A — no runtime path reached either function, so there is nothing to exercise by hand.
Related Issues
Closes #25842
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)