Commit graph

1083 commits

Author SHA1 Message Date
Paulo Castellano
588891767b Leave created_via null when omitted or invalid.
Provenance is optional analytics — only persist a CreatedVia value when callers set a valid one.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 11:36:02 -03:00
Paulo Castellano
a545d29cfb Treat created_via as non-blocking analytics data.
Default to web when the value is missing, null, or invalid so post creation never fails over provenance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 11:34:24 -03:00
Paulo Castellano
459f4dd5a5 Harden created_via: require it, cover duplicate and all entry points.
Reject CreatePost calls without CreatedVia, set Web on DuplicatePost, and assert wiring for templates, AI, automation, and API spoof attempts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 11:30:15 -03:00
Paulo Castellano
26d0b2cdb2 chore: added strict types 2026-07-24 11:22:28 -03:00
Paulo Castellano
06f83a6571 Track post creation origin via created_via.
Persist whether a post was created through web, MCP, API, or automation so we can attribute entry points without guessing from request context.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 11:19:01 -03:00
Paulo Castellano
e2c43339e2
Merge pull request #202 from trypostit/fix/x-media-upload-finalize-json-body
fix(x): send JSON body on chunked media upload finalize
2026-07-24 11:03:34 -03:00
Paulo Castellano
38d74e358d fix(x): poll official media upload STATUS endpoint
Use GET /2/media/upload?media_id=&command=STATUS per X API docs, and persist
redacted raw_response on SocialPublishException failures for supportability.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 10:43:32 -03:00
Paulo Castellano
35e7b703b6 fix(x): harden chunked media upload handling and coverage
Fail hard when media processing fails, map media-specific X invalid-request
errors clearly, and cover GIF/large-image/amplify/finalize/append failure paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 10:30:34 -03:00
Paulo Castellano
8f4d33cc11 fix(x): send JSON body on chunked media upload finalize
X rejects empty finalize requests with "Request body must be a JSON object",
breaking video and large-media posts that use the chunked upload flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 10:25:40 -03:00
Paulo Castellano
8c7102afa6
Merge pull request #201 from trypostit/feat/laravel-boost-cursor
feat: wire Laravel Boost for Cursor (Sail + skills)
2026-07-23 13:22:03 -03:00
Paulo Castellano
dcfcd1589a refactor: standardize command usage in documentation and update agent settings
- Replaced `vendor/bin/sail` with `php` in documentation to unify command instructions.
- Updated `.mcp.json` and `.cursor/mcp.json` to reflect changes for Laravel Boost.
- Enhanced clarity in skill documentation for Cashier, Horizon, MCP, Passport, Pest, and Wayfinder.
- Disabled Sail support in `boost.json` and introduced "codex" as a new agent.
2026-07-23 12:50:01 -03:00
Paulo Castellano
3c9ceda872 refactor: update documentation to remove Sail references and improve command usage
- Replaced instances of `vendor/bin/sail` with `php` in various documentation files to standardize command usage.
- Updated `.mcp.json` and `.cursor/mcp.json` to reflect the new command for Laravel Boost.
- Adjusted skill documentation files for Cashier, Horizon, MCP, Passport, Pest, and Wayfinder to enhance clarity and ensure proper command execution.
- Disabled Sail support in `boost.json` and added "codex" as a new agent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 12:44:14 -03:00
Paulo Castellano
0c4acb04e8 refactor: update commands to use Sail and improve documentation
- Changed command from `php artisan` to `vendor/bin/sail artisan` in various documentation files to ensure consistency with the use of Laravel Sail.
- Updated `.mcp.json` to reflect the new command for Laravel Boost.
- Added new agent "cursor" in `boost.json` and enabled Sail support.
- Updated PHP version in `CLAUDE.md` from 8.4 to 8.5.
- Made minor adjustments to various skill documentation files to enhance clarity and ensure proper command usage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 12:42:12 -03:00
Paulo Castellano
80c478541e
Merge pull request #199 from trypostit/fix/youtube-shorts-3-minutes
fix: raise YouTube Shorts max duration to 3 minutes
2026-07-23 12:24:05 -03:00
Paulo Castellano
8964dda8f2 fix: raise YouTube Shorts max duration to 3 minutes
YouTube Shorts now allow videos up to 3 minutes. The dashboard media rules still capped uploads at 60s (API/MCP already had no duration gate), so align the frontend validation, content-type copy, and unit test.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 12:06:15 -03:00
Paulo Castellano
71df3bf801
Merge pull request #198 from trypostit/fix/chunked-upload-unicode-filename
fix: allow unicode filenames in chunked asset uploads
2026-07-23 12:00:01 -03:00
Paulo Castellano
246022e9bc test: cover ChunkedAssetReceiver and ChunkReceipt paths
Adds dedicated tests for local assemble, multipart complete/progress, MediaResource response shape, and orphan R2 cleanup when media registration fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:51:13 -03:00
Paulo Castellano
a4f5c35ead fix: refresh assets gallery after deleting an upload
The uploads grid is client-fetched, so an Inertia delete with preserveState left the stale list on screen until a hard refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:38:29 -03:00
Paulo Castellano
c1b28159b2 refactor: split HasMedia path storage into image vs stream helpers
Keep the image-normalize vs binary-stream split, but move each path into a focused private method so addMediaFromPath stays linear.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:23:05 -03:00
Paulo Castellano
66dbf438ee style: use interpolated medias/{$filename} paths
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:21:52 -03:00
Paulo Castellano
2ba5ce2b3f refactor: pull chunked upload orchestration out of AssetController
Controller only authorizes and returns ChunkReceipt. Multipart vs local assemble lives in ChunkedAssetReceiver; JSON shape comes from MediaResource.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:18:10 -03:00
Paulo Castellano
08ce75d2ec refactor: harden chunked cloud uploads after full PR review
Fix real edge cases: enforce 5MiB non-final parts, track offsets for ordered/idempotent chunks, size from bytes received, delete orphaned R2 objects if Media create fails, and split the controller into clearer paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:16:39 -03:00
Paulo Castellano
3c59dce349 test: cover chunked uploads across local, public, and S3 disks
Dataset for multipart strategy selection plus HTTP paths for assemble (local/public/images) and multipart (s3/r2/spaces videos).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:09:44 -03:00
Paulo Castellano
d4be085642 refactor: clarify multipart is an object-storage fast path, not a disk limit
Local/public already used the assemble-then-store flow. Rename supports() so it is obvious every filesystem disk works; multipart only kicks in for S3-compatible remote disks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:07:11 -03:00
Paulo Castellano
cd79554cfb fix: multipart chunked video uploads directly to R2
The last chunk was reassembling the full file locally and pushing ~185MB to R2 in one request (53s+). Videos/PDFs now upload each chunk as an S3 multipart part so finalize only completes the upload.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:04:52 -03:00
Paulo Castellano
005d3c9dd6 fix: stream chunked video finalize to object storage
Unicode filename encoding was correct, but large videos still died on the last chunk: the whole file was loaded into memory and uploaded to R2 via Guzzle within PHP-FPM's 30s limit. Stream non-images with writeStream and lift the time limit on finalize.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 10:55:57 -03:00
Paulo Castellano
f4513efc70 fix: allow unicode filenames in chunked asset uploads
X-File-Name is an HTTP header, so raw en-dashes/emoji blow up fetch() before the request leaves the browser. Percent-encode on the client and rawurldecode on the server.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 10:46:48 -03:00
Paulo Castellano
3194ec2069
Merge pull request #190 from trypostit/feat/release-changelog-thumbnail
feat(release): render a branded changelog thumbnail in the release ritual
2026-07-18 17:06:49 -03:00
Paulo Castellano
805a628f66 feat(release): render a branded changelog thumbnail in the release ritual
Add a 1200x630 changelog thumbnail as a fourth release artifact, generated
from a shared brand template that mirrors the marketing-site hero / OG image:
warm cream to lavender wash, ink dot-grid, an Instrument Serif headline with a
hand-drawn violet squiggle, a segmented 'CHANGELOG | <version>' sticker badge,
and colored ink-bordered theme chips with solid offset shadows.

- .claude/release-assets/: render-thumbnail.mjs (Playwright renderer),
  thumbnail.template.html (brand template), logo.png (TryPost wordmark)
- .claude/commands/release.md: new Step 5b renders the thumbnail; it is
  versioned in the artifacts PR alongside the changelog and email
- releases/v1.0.6/thumbnail.png: image for the latest release
2026-07-18 16:56:38 -03:00
Paulo Castellano
501de51327
Merge pull request #189 from trypostit/chore/release-v1.0.6-artifacts
chore(release): v1.0.6 changelog + customer email artifacts
2026-07-18 16:24:04 -03:00
Paulo Castellano
2894b388b8 chore(release): make the /release command English-only 2026-07-18 16:21:27 -03:00
Paulo Castellano
32bee12086 chore(release): always version release artifacts via a PR in the /release command 2026-07-18 16:20:47 -03:00
Paulo Castellano
47c8224083 chore(release): add v1.0.6 changelog + customer email artifacts 2026-07-18 16:18:12 -03:00
Paulo Castellano
60c4c5324d
Merge pull request #188 from trypostit/feat/onboarding-referral-source
feat(onboarding): add "where you found us" referral-source step
2026-07-18 16:11:56 -03:00
Paulo Castellano
a78f5a96ae feat(onboarding): add "where you found us" referral-source step
Adds a single-select referral-source step between the goals and connect
steps of onboarding. The choice is stored on users.referral_source and
mirrored to PostHog, mirroring the existing persona and goals steps.

- ReferralSource enum (12 sources) + nullable users.referral_source column
- referralSource()/storeReferralSource() controller actions with the same
  self-hosted, subscribed, persona and goals guards as the sibling steps
- connect() now requires a referral source before rendering
- Single-select ReferralSource.vue page mirroring the goals step
- Localized across all 15 locales
2026-07-18 16:07:11 -03:00
Paulo Castellano
7b37190358
Merge pull request #128 from dantaspaulo/feat/ai-brand-colors-toggle
feat(ai-create): let users choose brand colors or free AI colors for images
2026-07-18 15:17:44 -03:00
Paulo Castellano
2c2ab69e68 Merge main + finalize AI brand-colors toggle
Resolves the AiPostWizard conflict and completes the feature:
- i18n parity: brand_colors_label + brand_colors_description in all 15 locales
  (was en/es/pt-BR only, which broke LocalizationParityTest).
- Reworked the two-button toggle into a Switch with an explanatory description
  (matches the settings Switch/card pattern).
- Only shown for templates that honor the flag: added appliesBrandVisuals() to
  the AiContentTemplate contract (ImageCard=true, tweet cards=false), exposed as
  applies_brand_visuals in the create-page DTO, and gated the toggle on it — so
  it no longer appears (as a no-op) for tweet-card styles.
- Tests: TemplateContractTest covers appliesBrandVisuals for all templates.
2026-07-18 15:12:26 -03:00
Paulo Castellano
d0c32751d7
Merge pull request #147 from dantaspaulo/feat/settings-into-user-menu
refactor(sidebar): move Settings from the sidebar footer into the user menu
2026-07-18 14:49:07 -03:00
Paulo Castellano
0544b3a915 Merge remote-tracking branch 'origin/main' into feat/settings-into-user-menu
# Conflicts:
#	resources/js/components/AppSidebar.vue
2026-07-18 14:46:09 -03:00
Paulo Castellano
e4806c7662 refactor(sidebar): show Profile before Settings in the user menu 2026-07-18 14:42:45 -03:00
Paulo Castellano
132f84f404
Merge pull request #187 from trypostit/feat/mobile-experience
Improve the mobile experience (post editor + app-wide polish)
2026-07-18 14:37:22 -03:00
Paulo Castellano
f63286efd4 fix(sidebar): open the workspace menu to the side on desktop with a matching icon
The workspace switcher now opens to the right on desktop (like the user menu)
and stays below the trigger on mobile, via useSidebar()'s isMobile. The trigger
icon follows the direction: chevron-right on desktop, an up/down selector on
mobile — for both the workspace switcher and the user menu.
2026-07-18 14:34:15 -03:00
Paulo Castellano
bc93667fcf fix(mobile): clear the hamburger and match its size on the scheduled editor banner
The scheduled-post banner in the editor now clears the floating sidebar
trigger on mobile (pl-12 md:pl-0), aligns its calendar icon to the top of
the text, and matches the hamburger's size (size-10 md:size-9). Desktop is
unchanged.
2026-07-18 14:17:18 -03:00
Paulo Castellano
2c52c90b6e fix(mobile): polish automations, dialogs, workspaces and post views
- automations: minimal back-only header on mobile for the workflow builder
  and detail tabs (extracted AutomationMobileBackHeader); open live
  automations on the metrics tab (drafts still open on workflow); full-width
  status filter + refresh on the invocations toolbar; use IconMenu2 for the
  mobile sidebar trigger
- dialogs: stack DialogFooter primary-on-top / cancel-at-bottom on mobile
- workspaces: bring the workspace picker cards into the neo-brutalist design
- posts: left-align the label filter content; wrap the post-view date/status
  header so a long status badge no longer squeezes the date; add hamburger
  clearance to the editor's mobile tab bar
2026-07-18 10:58:07 -03:00
Paulo Castellano
e94f2cfe96 fix(posts): hide the autosave status in the mobile switcher
It's only the autosave indicator (Draft/Saving/Saved) and it crowded the tabs.
Drop it from the mobile switcher (the desktop header still shows it) so the tabs
get the full bar.
2026-07-18 09:35:50 -03:00
Paulo Castellano
708f1adbd2 fix(posts): align the mobile switcher bar with the sidebar trigger
Use py-3 so the tabs sit at the same vertical position as the top-3 hamburger,
and rounded-md so the tab corners match the trigger.
2026-07-18 09:32:23 -03:00
Paulo Castellano
119edef5b9 fix(posts): mobile editor — taller switcher tabs and a wider Post now button
Match the switcher tab height to the sidebar trigger (h-10), and let the primary
publish button fill the footer (flex-1) on mobile while staying auto-width on desktop.
2026-07-18 09:28:07 -03:00
Paulo Castellano
da5066e43e fix(posts): merge the editor status into the mobile switcher bar
On mobile the header was a whole bar showing only the Draft/Saving/Saved status.
Move that status into the switcher bar (right side) and hide the header on mobile
(the scheduled banner still shows), reclaiming a row. The switcher clears the
floating hamburger when it's the top bar.
2026-07-18 09:20:51 -03:00
Paulo Castellano
b7351667e2 fix(posts): tidy the post-view header on mobile
Stack it into a clean back-button row and a date + status row (date left, badge
right) instead of cramming everything into one line where the date wrapped and
the badge floated.
2026-07-18 09:06:56 -03:00
Paulo Castellano
fd557fe559 fix(ui): align the mobile sidebar trigger with the header buttons
Move the floating hamburger from left-2/top-2 to left-4/top-3 so it lines up
with the header's content padding (and the calendar's nav buttons); bump the
non-header page top reserve to pt-14 to clear the taller trigger.
2026-07-18 08:59:55 -03:00