Repository navigation
feat(posts): keep post counters fresh and re-check publishing permissions - #1776
Merged
Merged
Conversation
viethung0o0
force-pushed
the
feat/posts-fresh-metrics
branch
2 times, most recently
from
November 25, 2026 08:53
eb76f0d to
5da98ec
Compare
viethung0o0
marked this pull request as ready for review
November 25, 2026 09:03
…ions - Refresh the counters of the posts on screen when they are older than five minutes, one background read per inbox - Read Facebook counts with one Graph batch request; a post that is gone no longer stops the other posts of the batch - Read a new post's counts as soon as its first comment creates it, and count Threads comments from the webhook - Make Refresh from channel read the post in the request and return the result - Re-check publishing permissions from the platform when the Connect tab opens, and shorten the reconnect button - Redact debug_token tokens from logs and error messages - Add the refresh-metrics and recheck-permissions public APIs and CLI commands
viethung0o0
force-pushed
the
feat/posts-fresh-metrics
branch
from
November 25, 2026 09:57
5da98ec to
cb99ee6
Compare
5 of 7 tasks
sung17
pushed a commit
to gitpascal/ChatbotX
that referenced
this pull request
Nov 26, 2026
Resolve conflicts with ChatbotXIO#1769, ChatbotXIO#1776 and ChatbotXIO#1783: - keep grantedScopes from the direct code exchange next to loginType - route main's new post listing/management calls (me/media, me/stories, managed media) through the login-type-aware Graph client - keep the AhaChat import availability wrapper on the Instagram picker - merge the connectSessions.get description with main's selectable guidance Co-Authored-By: Claude Opus 5.5 <[email protected]>
8 tasks done
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.
Follow-up to #1769 and #1775.
Problem
comments.summarywithoutfilter(stream)).Changes
post.getPostsMetricschannel action. Facebook uses one Graph batch request (≤ 50 sub-requests); Instagram reads each media. A post the platform answers as gone or unreadable (Graph code 10) is skipped on its own and the rest of the batch is still written; auth and rate-limit answers stop the batch, and a permission error is raised only when no post of the batch could be read. Channels without a batch read are skipped.{ outcome, post }; the deprecatedqueued: trueis kept for existing clients.POST /v1/channel-posts/management/refresh-metrics(channel-posts refresh-metrics), docs updated.Publishing permissions re-check (Connect tab)
debug_token(scopes,is_valid) on the stored Page token; TikTok → thescopeof the existing token refresh response (now stored); Instagram Login and Threads document no way to read a token's granted permissions, so they are not re-checked.checkedAt, so a re-check that started before a reconnect never overwrites it. ApermissionMissingrecorded from a refused publish is cleared only when the same token now has every required permission.input_tokenandappsecret_proofare redacted from logs and error messages.POST /v1/posts/destinations/recheck-permissions(post-destinations recheck-permissions) →{ queued, fresh, failed, skipped }.Checks
pnpm check-types,pnpm lint(invariants, i18n, schema drift)