Repository navigation
feat(model): add plan block - #1680
Conversation
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1680 +/- ##
=========================================
Coverage 73.73% 73.73%
- Complexity 4676 4678 +2
=========================================
Files 487 487
Lines 14667 14669 +2
Branches 1528 1528
=========================================
+ Hits 10814 10816 +2
Misses 2944 2944
Partials 909 909
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
zimeg
left a comment
There was a problem hiding this comment.
Solid and simple implementation just one QQ!
| /** | ||
| * A unique identifier for a block. If not specified, one will be generated. Maximum length for this field is | ||
| * 255 characters. {@code block_id} should be unique for each message and each iteration of a message. If a | ||
| * message is updated, use a new {@code block_id}. | ||
| */ |
There was a problem hiding this comment.
🪓 quibble: Let' s match other block implementations
There was a problem hiding this comment.
Removed the block_id comment in 1373585 to match TaskCardBlock, CardBlock, and the other recent blocks.
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
|
|
||
| // PlanBlock | ||
|
|
||
| public static PlanBlock plan(ModelConfigurator<PlanBlock.PlanBlockBuilder> configurator) { |
There was a problem hiding this comment.
suggestion: Could we add a plan(...) case to BlocksTest like the taskCard one? The checklist in slack-api-model/AGENTS.md asks for a test per helper.
|
🌟 Thanks for the kind review and merge @mwbrooks! Plan blocks in Java now match Python and Node. |
This pull request adds the
planlayout block to the Java SDK model.PlanBlock(plan) withtitle,tasks, andblockId, with Javadoc copied from the docs fields table.tasksisList<TaskCardBlock>, matching the Python and Node SDKs.PlanBlockis registered inGsonLayoutBlockFactory.Blocks.plan(...)builder helper.BlockKitTestparses the docs example and builds the same plan.Kotlin DSL support is left for a follow-up, like
task_card.Category (place an
xin each of the[ ])Testing
Post a plan with
chat.postMessage:Confirm
response.isOk()and that both tasks render under the plan title with their statuses.Read the message back with
conversations.historyand confirm the block parses as aPlanBlockwith twoTaskCardBlocktasks.Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.
🤖 Generated with Claude Code