Repository navigation
Show a reel's track even when it was saved with only its id - #434
Merged
Merged
Conversation
added 2 commits
October 16, 2026 13:52
The composer now fills in a picked track's name, cover and preview when they are missing (an MCP or API post may send only meta.audio.id), and the unsaved-changes guard compares a track by its id and volumes only, so details that arrive after the first click never ask before closing. The MCP descriptions name the instagram-facebook platform, ask to copy the track details into meta.audio, and explain that collaborators must accept the invite.
Picking a track no longer spends an audio lookup, the lookup no longer requires the answer to repeat the id, and the guard helper is named for what it returns.
added 3 commits
October 16, 2026 14:35
The waits in ComposerUnsavedChangesTest and ComposerChannelSettingsTest go through helpers in tests/Pest.php instead of a polling loop copied per file and inline querySelector conditions. AGENTS.md now requires the shared helpers for every wait; moving the other browser tests is tracked in #435.
paulocastellano
pushed a commit
to trypostit/trypost-docs
that referenced
this pull request
Oct 16, 2026
Follows trypostit/trypost#434: the app fills a track's name, cover and preview when they are missing, and the MCP descriptions now ask to copy them and explain that collaborators must accept the invite.
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.
What
Composer: when a reel's track has an
idbut no title, cover or preview (an MCP or API post may send onlymeta.audio.id), the composer looks the track up when it opens and fills in what is missing: name, artist, cover and preview. Before this change it looked the track up only when a stored cover failed to load, so a track saved with only an id showed no name, no cover and a disabled preview, in the settings and in the reel preview.Lookup: it runs only when the composer opens a reel (or the post type becomes Reel), never when a track is picked from the search, which already returned the same details. It only adds what is missing: a stored cover or preview is never replaced with an empty value, and a name or artist already stored is kept.
Cost: one audio lookup the first time a post with missing details is opened, then cached for an hour per account and track. A track whose cover Instagram never provides (some original sounds) is looked up again when that cache expires.
Unsaved-changes guard (
useComposerUnsavedChanges.ts): a track is compared by itsidand volumes only. Its name, cover and preview come with the id and are filled in by the composer on its own, so a lookup that lands after the first click no longer asks "Discard changes?" when you close an untouched post. Before, this could already happen with the renewal of an expired cover.MCP descriptions:
search-instagram-audio-toolandget-instagram-audio-toolname the platform (instagram-facebook), and the search asks to copytitle,artist,cover_urlandpreview_urlintometa.audio.audio, and explains that a collaborator sees the post on their profile only after accepting the invite in the Instagram app, and that a username that does not exist is refused only when the post publishes.Browser test waits: shared helpers in
tests/Pest.php(waitFor,waitForGone,waitForState,waitForText,waitForGoneOrShown,waitForPath,waitForCondition) take a CSS selector where@namestands for a test id, as in$page->click('@name'). They replace the polling loop each file copied.ComposerUnsavedChangesTestandComposerChannelSettingsTestuse them with noquerySelectorinside a wait. AGENTS.md now requires them for every wait; moving the other 96 files is Move every browser test to the shared wait helpers #435.Tests
tests/Browser/ComposerUnsavedChangesTest.php, both new tests checked to fail without their change:a reel whose track was saved with only its id shows the track name and cover: fails without the lookup on open.track details that arrive after the first click do not count as an unsaved change: delays the lookup by 1.5 s, clicks first, then closes. Fails without the guard change.a music cover renewed after the post opened…: its track now carries apreview_url, so it still tests a broken cover being renewed (with the preview missing, the track would now be looked up when it opens).tests/Browser/ComposerChannelSettingsTest.php›the instagram reel card picks music…: also asserts that picking a track makes no detail lookup (it counts the composer's requests in the browser). Fails if the lookup watches the track id.tests/Feature/Mcp/ToolDocumentationTest.php: the new description text.ComposerUnsavedChangesTest(53),ComposerChannelSettingsTest(64), MCP documentation,PostPlatformMetaRulesTest,FullPostParityTest,ChannelsParityTest.Manual test checklist
instagram-facebookaccount withmeta.audioholding onlyid, then open it in the composer: the music row shows the name, artist and cover, preview plays, and the reel preview shows "Title · Artist".