Upgrade merge - #94
Merged
Merged
Conversation
…ing revoke Meta drops permissions it has not approved, or that the user declined, without failing the grant. The connection then reports Connected and only breaks later — at publish or insights time — with an opaque platform error. That is how Instagram publishing stayed broken until Meta's app review said so, rather than the app saying so at connect time. Read the grant back after connecting and record what is missing. The readback inspects the token via /debug_token rather than /me/permissions: these accounts hold a Page token, so /me resolves to the Page, which has no permissions edge. A platform that cannot be asked reports unknown, never an empty set — that would flag every scope as missing. The comparison applies the same analytics-scope flag OAuth used, so a scope deliberately omitted when a platform's analytics is off is not reported as absent. Ask again for scopes the user declined. Without auth_type=rerequest Meta skips the dialog entirely on a reconnect, so a declined scope could never be requested a second time. It does not force the full permission list for someone who granted everything — only removing the app does that. Stop pretending disconnect revokes anything. The only endpoint that would, DELETE /me/permissions, revokes this app for the whole person: one workspace disconnecting one Page would sever every other Page and Instagram account they connected anywhere. It never worked here anyway, being called with a Page token. It is now an explicit no-op, and the disconnect dialog says where to actually revoke. Underneath that sat a real defect: select_account and the connection-link flow had each written their own page-token selection and diverged. Onboarding fell back to the *user* token for a Facebook Page, which publishes under the wrong identity and made that account eligible for the revoke above. Both flows now share resolve_page_account_token, and a Page we have to skip is reported to the client instead of leaving them on a success page for an account that was never connected. Also fixes a permanently-red test: test_fetch_post_comments... pinned 2026-08-07, which had drifted past FACEBOOK_FEED_WINDOW_DAYS so the window floor landed after it and the assertion inverted. Both dates are now relative to now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ility fix(social-accounts): make a partial Meta grant visible, and stop faking revoke
Django's {# #} syntax is single-line only: the lexer matches {#.*?#}
without DOTALL, so a comment that wraps onto a second line is never
recognised as one and falls through as plain text. Two comments had
wrapped, and were printing verbatim in the UI - the disconnect
rationale inside the account card's confirmation popover, and the
first-comment note in every row of the sent-posts table.
Move both to {% comment %} blocks, which do span lines.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ment-acc369
fix(templates): stop multi-line {# #} comments rendering to the page
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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 does this PR do?
Why?
How to test
Checklist
pytest)ruff check .andruff format --check .)