Skip to content

Manual publish / notify-me mode - #249

Open
caomicc wants to merge 3 commits into
trypostit:mainfrom
caomicc:feat/manual-publish-mode
Open

Manual publish / notify-me mode#249
caomicc wants to merge 3 commits into
trypostit:mainfrom
caomicc:feat/manual-publish-mode

Conversation

@caomicc

@caomicc caomicc commented Aug 6, 2026

Copy link
Copy Markdown

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

  • New publish_mode column on posts (auto (default) / manual) + a manual_publish_notified_at guard so the notification fires exactly once per post.
  • ProcessScheduledPosts branches on mode: auto posts publish as before; manual due posts stay scheduled and dispatch a one-time notification. A manual post is never auto-published.
  • New post_manual_publish_due notification type + PostReadyForManualPublish mailable (caption + first 6 media thumbnails + link to the post).
  • publish_mode surfaced through the MCP create/update-post tools, the web + API UpdatePostRequest, and PostResource.Frontend: radio toggle in the editor's channels/schedule tab (auto vs. notify-me), with a small hint under the manual option.
  • New i18n keys added to all 16 locales (parity test passes).

Verified

  • Pest suite: 3009 passed, 2 skipped, 0 failed (added manual-mode coverage to ProcessScheduledPostsTest, publish_mode persistence to CreatePostTest, updated the PostResource shape assertion in PostToolTest).
  • Pint clean, ESLint clean; vue-tsc introduces no new errors.

Notes

  • Manual posts stay in scheduled status after notifying and are never auto-published; the owner publishes from the native app and can then delete/unschedule/re-schedule the TryPost record as they like (a "mark as published" action is a natural follow-up).
  • Pre-existing media/FormDataConvertible TS quirks and npm audit warnings are untouched (out of scope here).

Testing

php artisan test --compact

Copilot AI lite review requested due to automatic review settings August 6, 2026 22:56
@caomicc caomicc changed the title Add manual publish Manual publish / notify-me mode Aug 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 auto posts, and to notify once for due manual posts (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->content is nullable (posts.content is nullable), so passing it directly to mb_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),

Comment thread resources/js/pages/posts/Edit.vue Outdated
Comment on lines +41 to +44
Post::query()
->manualDueNotNotified()
->each(function (Post $post) {
$owner = $post->workspace?->owner;
Comment thread app/Mail/PostReadyForManualPublish.php Outdated
public function envelope(): Envelope
{
return new Envelope(
subject: 'Your post is ready to publish — '.$this->post->workspace->name,
Comment thread lang/zh/notifications.php Outdated

'post_manual_publish_due' => [
'title' => '有帖子可以手动发布了',
'body' => '此帖子已可发布 — 请在应用中发布::“caption”',
Comment thread app/Actions/Post/CreatePost.php Outdated
* 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>
@paulocastellano

Copy link
Copy Markdown
Contributor

@caomicc can you please explain the use case for this pull reques?

@caomicc

caomicc commented Aug 6, 2026

Copy link
Copy Markdown
Author

@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.

@paulocastellano

Copy link
Copy Markdown
Contributor

@caomicc

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants