Fixes #70: Rework /esb-status Slack command as an interactive modal#73
Conversation
Reworks /esb-status to open a Block Kit modal (summary + per-area "View details" buttons + area detail with back navigation) instead of an ephemeral message, so it works in channels the bot isn't a member of and avoids confusing "Only visible to you" replies. Spec produced via the quick-spec workflow and hardened through two adversarial review passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QzHqw96wXCi9i6aK349yZa
Replace the ephemeral /esb-status reply with a Block Kit modal opened via views_open, fixing the confusing "Only visible to you" UX and the bot's inability to post into channels it is not a member of. - Summary modal: one section per non-empty area, each with a "View details" button accessory (distinct block_id) that swaps the modal in place (views_update) to that area's detail view, which has a "Back to summary" button. - Preserve the text-arg deep-link: area name wins over equipment search; a single equipment match opens its area's detail; ambiguous/no-match/archived targets land on the summary. Archived-area deep-links are routed to the summary inline (AreaArchived), not surfaced as an error. - Error fallback replies via the slash command's response_url (Bolt's respond), which works even when the bot is not a channel member; action handlers swap to an in-modal error view. - Add build_status_summary_modal / build_area_status_modal builders and the shared _area_summary_mrkdwn helper; remove the now-dead text formatters (format_status_summary, format_equipment_status_detail, format_equipment_list). - Bump version to 0.16.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QzHqw96wXCi9i6aK349yZa
|
@claude please review this change |
|
Claude finished @jantman's task in 2m 35s —— View job Review:
|
There was a problem hiding this comment.
Pull request overview
This PR reworks the /esb-status Slack slash command from posting ephemeral channel messages into opening a Block Kit modal with per-area navigation, addressing the “Only visible to you” confusion and the bot-not-in-channel posting limitation described in issue #70.
Changes:
- Replaces
/esb-statusoutput withviews_opensummary modal and adds button action handlers thatviews_updateto area detail and back. - Adds modal builder functions in
esb/slack/forms.pyand removes now-dead legacy text formatter tests. - Updates Slack handler and form unit tests to assert modal structure/behavior; bumps project version to 0.16.0.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
esb/slack/handlers.py |
Opens /esb-status as a modal and adds action handlers for in-modal navigation + error fallback via respond. |
esb/slack/forms.py |
Introduces build_status_summary_modal, build_area_status_modal, and _area_summary_mrkdwn for modal content generation. |
tests/test_slack/test_handlers.py |
Rewrites /esb-status tests to assert views_open/views_update behavior and response_url fallback. |
tests/test_slack/test_forms.py |
Removes legacy formatter tests and adds modal builder tests (structure + Block Kit constraint assertions). |
pyproject.toml |
Version bump to 0.16.0. |
_bmad-output/implementation-artifacts/tech-spec-esb-status-modal.md |
Adds implementation tech spec and review notes artifact for the modal rework. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Block Kit caps a section's text at 3000 chars; a single unbounded RepairRecord.description (db.Text) can exceed it and make views_open/views_update fail with invalid_blocks. Truncate the per-area summary sections and the area-detail section to _SECTION_TEXT_LIMIT so the modal always opens. Addresses Copilot review feedback on PR #73. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QzHqw96wXCi9i6aK349yZa
Summary
Reworks the
/esb-statusSlack command (issue #70) from an ephemeral text reply into an interactive Block Kit modal, fixing two UX problems: the confusing "Only visible to you" ephemerals, and the bot's inability to post into channels it is not a member of.views_open): one section per non-empty area, each with a "View details" button accessory (in a distinctblock_id) that swaps the modal in place (views_update) to that area's detail view, which has a "Back to summary" button.AreaArchived), not surfaced as an error.response_url(Bolt'srespond), which works even when the bot is not a channel member — the exact limitation this feature fixes. Button-action failures swap to an in-modal error view.build_status_summary_modal/build_area_status_modalbuilders plus the shared_area_summary_mrkdwnhelper; removes the now-dead text formatters (format_status_summary,format_equipment_status_detail,format_equipment_list).Testing
make lint— cleanmake test— 1805 passedTestEsbStatusCommand(modal assertions),TestEsbStatusActions,TestBuildStatusSummaryModal,TestBuildAreaStatusModal(incl. Block Kit ≤100-block / ≤3000-char guards).Implemented via the BMAD quick-dev workflow; an adversarial review pass was run and its findings resolved (see
_bmad-output/implementation-artifacts/tech-spec-esb-status-modal.md→ Review Notes).🤖 Generated with Claude Code
https://claude.ai/code/session_01QzHqw96wXCi9i6aK349yZa