Refactor PostableObject into dedicated module and add fallback support#191
Merged
haydenbleasel merged 2 commits intochat/plansfrom Mar 6, 2026
Merged
Conversation
Move PostableObject to dedicated file, update type exports, add fallback posts, and make PostableObject generic. Slack-Thread: https://vercel.slack.com/archives/C0977L169MW/p1772755978706959?thread_ts=1772755978.706959&cid=C0977L169MW Co-authored-by: Vishal Yathish <135551666+visyat@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Plan mutations (addTask, updateTask, complete) now work in fallback mode by using editMessage with fallback text instead of no-oping - Revert Slack adapter to throw on unsupported kinds (caller handles fallback, so adapter-level fallback strings are unnecessary) - Remove redundant re-exports of isPostableObject/PostableObject from plan.ts — export from canonical postable-object.ts only - Stop exporting POSTABLE_OBJECT symbol (internal implementation detail) - Fix nested ternary lint error in getFallbackText - Add tests for fallback post/edit path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
haydenbleasel
approved these changes
Mar 6, 2026
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.
Addresses @cramforce's code review comments from PR #115.
What changed
postable-object.tsas a dedicated module for thePostableObjectinterface andisPostableObjecttype guardPlanModel,PlanTask, etc.) fromtypes.tstoplan.tsto keep them co-located with the Plan implementationPostableObjectgeneric (PostableObject<TData>) for better type safetygetFallbackText()method toPostableObjectinterface for adapters that don't support the object typehandlePostableObjectin boththread.tsandchannel.tsto post fallback text when adapter doesn't support the objectpostObjectandeditObjectin Slack adapter to log warnings and return fallback instead of throwing for unsupported kindsHow to test
Planobject to a thread - it should work normally with native Slack blocks