Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: attribute each unknown X check to the page that failed to render (#3633)

[._.]/ Adam Eivyed43e9ff2983
diff --git a/client/src/pages/X.jsx b/client/src/pages/X.jsx
index 9350bfeab4..1dc7629c42 100644
--- a/client/src/pages/X.jsx
+++ b/client/src/pages/X.jsx
@@ -225,11 +225,14 @@ export default function XPage() {
const snapshot = selected?.profileSnapshot || {};
const profile = snapshot.profile || {};
const checks = snapshot.diagnostics || {};
- const unreadDetail = 'The profile page did not return a handle, so this check could not be observed. Re-run the diagnostic.';
+ // A check is only `true`/`false` when its own page actually rendered — anything else (unread
+ // page, or no snapshot at all) is Unknown and must not carry an observation-shaped detail.
+ const unreadDetail = (page) => `The ${page} did not render, so this check could not be observed. Re-run the diagnostic.`;
+ const checkDetail = (value, page, observed) => value == null ? unreadDetail(page) : observed;
const checkRows = [
- { label: 'Public profile reachable', value: checks.profilePublic, detail: checks.profilePublic === null ? unreadDetail : 'The profile page returned the configured handle.' },
- { label: 'Exact account search', value: checks.appearsInPeopleSearch, detail: checks.appearsInPeopleSearch === null ? unreadDetail : 'The handle appeared in X People search.' },
- { label: 'Recent posts in Latest search', value: checks.recentPostsInLatestSearch, detail: checks.recentPostsInLatestSearch === null ? unreadDetail : `${formatCount(checks.latestSearchPostCount)} matching original post(s) were returned.` },
+ { label: 'Public profile reachable', value: checks.profilePublic ?? null, detail: checkDetail(checks.profilePublic, 'profile page', 'The profile page returned the configured handle.') },
+ { label: 'Exact account search', value: checks.appearsInPeopleSearch ?? null, detail: checkDetail(checks.appearsInPeopleSearch, 'account search', 'The handle appeared in X People search.') },
+ { label: 'Recent posts in Latest search', value: checks.recentPostsInLatestSearch ?? null, detail: checkDetail(checks.recentPostsInLatestSearch, 'Latest search', `${formatCount(checks.latestSearchPostCount)} matching original post(s) were returned.`) },
{ label: 'Recommendation eligibility', value: null, detail: 'X does not expose a public yes/no recommendation-eligibility signal here.' },
];
return <div className="space-y-4">
diff --git a/client/src/pages/X.test.jsx b/client/src/pages/X.test.jsx
index 9697708509..452ee8aa56 100644
--- a/client/src/pages/X.test.jsx
+++ b/client/src/pages/X.test.jsx
@@ -95,6 +95,21 @@ describe('X page', () => {
expect(screen.getByText(/Could not read the X profile page/)).toBeInTheDocument();
});
+ it('explains each unknown check by its own page rather than blaming the profile read', async () => {
+ api.getXAccounts.mockResolvedValue({ accounts: [{
+ ...account,
+ profileSnapshot: {
+ profile: { followers: 1 },
+ diagnostics: { profilePublic: true, appearsInPeopleSearch: null, recentPostsInLatestSearch: null, latestSearchPostCount: null },
+ },
+ }] });
+ renderPage(`/x/${account.id}/health`);
+ await screen.findByRole('heading', { name: 'Reach diagnostics for @example_user' });
+ expect(screen.getByText('The profile page returned the configured handle.')).toBeInTheDocument();
+ expect(screen.getByText(/The account search did not render/)).toBeInTheDocument();
+ expect(screen.getByText(/The Latest search did not render/)).toBeInTheDocument();
+ });
+
it('runs a manual diagnostic and keeps publishing out of the page workflow', async () => {
const user = userEvent.setup();
api.syncXAccount.mockResolvedValue({ account: { ...account, lastSyncAt: '2026-08-05T13:00:00.000Z' }, posts: [], ingested: 2 });