Manual publish / notify-me mode - #249
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a manual publishing mode for scheduled posts, allowing users to opt out of auto-publishing and instead receive a one-time notification (plus email) when a scheduled post becomes due.
Changes:
- Introduces
publish_mode(+manual_publish_notified_at) on posts, including model casts, API/MCP exposure, and factory support. - Updates the scheduler command to auto-publish only
autoposts, and to notify once for duemanualposts (including a queued mailable). - Adds UI controls for publish mode selection, translations, and expands test coverage for the new behavior.
Reviewed changes
Copilot reviewed 54 out of 54 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/Mcp/PostToolTest.php | Expects publish_mode in MCP post payloads. |
| tests/Feature/Commands/ProcessScheduledPostsTest.php | Adds coverage for manual mode notification + non-auto-publish behavior. |
| tests/Feature/Actions/Post/CreatePostTest.php | Verifies CreatePost defaults/persists publish_mode. |
| resources/views/mail/post-ready-manual-publish.blade.php | New email template for manual publish due notifications. |
| resources/js/types/post.ts | Adds frontend PostPublishMode constants/types. |
| resources/js/pages/posts/Edit.vue | Wires publish mode into edit + autosave + editor tabs. |
| resources/js/components/posts/editor/ScheduleTab.vue | Adds publish mode radio group UI. |
| resources/js/components/posts/editor/PostEditorTabs.vue | Threads publish mode prop/event through editor tabs. |
| lang/zh/posts.php | Adds publish mode translations (ZH). |
| lang/zh/notifications.php | Adds manual publish due notification strings (ZH). |
| lang/uk/posts.php | Adds publish mode translations (UK). |
| lang/uk/notifications.php | Adds manual publish due notification strings (UK). |
| lang/tr/posts.php | Adds publish mode translations (TR). |
| lang/tr/notifications.php | Adds manual publish due notification strings (TR). |
| lang/ru/posts.php | Adds publish mode translations (RU). |
| lang/ru/notifications.php | Adds manual publish due notification strings (RU). |
| lang/pt-BR/posts.php | Adds publish mode translations (PT-BR). |
| lang/pt-BR/notifications.php | Adds manual publish due notification strings (PT-BR). |
| lang/pl/posts.php | Adds publish mode translations (PL). |
| lang/pl/notifications.php | Adds manual publish due notification strings (PL). |
| lang/nl/posts.php | Adds publish mode translations (NL). |
| lang/nl/notifications.php | Adds manual publish due notification strings (NL). |
| lang/ko/posts.php | Adds publish mode translations (KO). |
| lang/ko/notifications.php | Adds manual publish due notification strings (KO). |
| lang/ja/posts.php | Adds publish mode translations (JA). |
| lang/ja/notifications.php | Adds manual publish due notification strings (JA). |
| lang/it/posts.php | Adds publish mode translations (IT). |
| lang/it/notifications.php | Adds manual publish due notification strings (IT). |
| lang/fr/posts.php | Adds publish mode translations (FR). |
| lang/fr/notifications.php | Adds manual publish due notification strings (FR). |
| lang/es/posts.php | Adds publish mode translations (ES). |
| lang/es/notifications.php | Adds manual publish due notification strings (ES). |
| lang/en/posts.php | Adds publish mode translations (EN). |
| lang/en/notifications.php | Adds manual publish due notification strings (EN). |
| lang/el/posts.php | Adds publish mode translations (EL). |
| lang/el/notifications.php | Adds manual publish due notification strings (EL). |
| lang/de/posts.php | Adds publish mode translations (DE). |
| lang/de/notifications.php | Adds manual publish due notification strings (DE). |
| lang/ar/posts.php | Adds publish mode translations (AR). |
| lang/ar/notifications.php | Adds manual publish due notification strings (AR). |
| database/migrations/2026_08_06_182217_add_publish_mode_to_posts_table.php | Adds publish_mode + manual_publish_notified_at columns. |
| database/factories/PostFactory.php | Defaults publish_mode and adds manual() factory state. |
| app/Models/Post.php | Adds casts, scopes, and helpers for publish mode + notification timestamp. |
| app/Mcp/Tools/Post/UpdatePostTool.php | Accepts/validates publish_mode via MCP update tool + schema. |
| app/Mcp/Tools/Post/CreatePostTool.php | Accepts/validates publish_mode via MCP create tool + schema. |
| app/Mail/PostReadyForManualPublish.php | New queued mailable for manual publish due email. |
| app/Http/Resources/Api/PostResource.php | Exposes publish_mode in API resource payloads. |
| app/Http/Requests/App/Post/UpdatePostRequest.php | Adds request validation for publish_mode (app). |
| app/Http/Requests/Api/Post/UpdatePostRequest.php | Adds request validation for publish_mode (API). |
| app/Enums/Post/PublishMode.php | New enum for auto vs manual. |
| app/Enums/Notification/Type.php | Adds PostManualPublishDue notification type. |
| app/Console/Commands/ProcessScheduledPosts.php | Splits auto publish vs manual notify-only scheduling behavior. |
| app/Actions/Post/UpdatePost.php | Persists publish_mode updates. |
| app/Actions/Post/CreatePost.php | Defaults and persists publish_mode during create. |
Suppressed comments (1)
app/Console/Commands/ProcessScheduledPosts.php:65
$post->contentis nullable (posts.content is nullable), so passing it directly tomb_strimwidth()can throw a TypeError. Cast to string (or provide a default) before trimming.
body: trans('notifications.post_manual_publish_due.body', ['caption' => mb_strimwidth($post->content, 0, 120, '…')], $post->workspace?->content_language),
| Post::query() | ||
| ->manualDueNotNotified() | ||
| ->each(function (Post $post) { | ||
| $owner = $post->workspace?->owner; |
| public function envelope(): Envelope | ||
| { | ||
| return new Envelope( | ||
| subject: 'Your post is ready to publish — '.$this->post->workspace->name, |
|
|
||
| 'post_manual_publish_due' => [ | ||
| 'title' => '有帖子可以手动发布了', | ||
| 'body' => '此帖子已可发布 — 请在应用中发布::“caption”', |
| * media?: array<int, mixed>, | ||
| * date?: ?string, | ||
| * scheduled_at?: ?string, | ||
| * publish_mode?: ?PublishMode, |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@caomicc can you please explain the use case for this pull reques? |
@paulocastellano of course! Basically I would like to be able to schedule posts and add music to my carousels. Adding music allows for carousels on instagram to show up in the reels feed which extends viz. Adding music however is only available on devices and not the desktop API. https://help.instagram.com/1223433768344104/ https://www.reddit.com/r/Instagram/comments/1rf86z2/how_important_is_adding_music_to_carrousels_for/ When on Buffer I was able to schedule posts and then have a notification to my phone which would allow me to save my post, open instagram, and start the process of posting. It would have copy paste and still allow for the analytics - while not ideal due to instagrams limitations this would allow me to then pick music manually. |
|
I got it! I will research more about this feature from buffer tomorrow and i will let you know. If you want join to discord community to discuss together you are welcome: https://trypost.it/discord |
… PHPDoc, mail interpolation, publish-mode handler
Summary
Adds a per-post publishing mode so scheduled posts aren't only ever auto-published. Selecting "Notify me to publish manually" makes a due post send the owner a notification (in-app + email) with the caption and media thumbnails instead of auto-publishing — handy for platforms/app-only features like adding music to an IG carousel before posting.
Solves #247
What it does
Verified
Notes
Testing
php artisan test --compact