Skip to content

fix(sync): show truthful primary status#1352

Merged
kunickiaj merged 1 commit into
mainfrom
07-23-fix_sync_show_truthful_primary_status
Jul 24, 2026
Merged

fix(sync): show truthful primary status#1352
kunickiaj merged 1 commit into
mainfrom
07-23-fix_sync_show_truthful_primary_status

Conversation

@kunickiaj

@kunickiaj kunickiaj commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Description

Replace the misleading coordinator-presence Online state with one fail-closed primary Sync status derived from enablement, Project-operation attention, pending setup, mutual trust, daemon health, enrollment, and reachability. Show one concrete next action and retain device-level follow-ups separately.

Closes codemem-5q8p.

Type of Change

  • 🚀 Feature (new functionality)
  • 🐛 Bug fix (fixes an issue)
  • 📚 Documentation (docs-only change)
  • 🔧 Maintenance (refactor, chore, CI, etc.)
  • 🧪 Testing (test-only changes)

Testing

  • Relevant checks pass locally (pnpm run tsc, pnpm run lint, pnpm run test)
  • Added/updated tests for changes
  • Manually verified changes work as expected

Status precedence, false-healthy states, badge/meta rendering, and viewer reconciliation tests passed. The complete stack passed pnpm run check with 3,310 tests.

Checklist

  • Code follows project style (pnpm run lint passes for touched files)
  • Self-review completed
  • Documentation updated (if needed)
  • No new warnings introduced

kunickiaj commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 174038e8a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts Outdated
Comment thread packages/ui/src/tabs/sync/index.ts
@kunickiaj
kunickiaj force-pushed the 07-23-feat_sharing_accept_project_invites_in_sharing branch from 82d03ae to 729dea0 Compare July 23, 2026 21:12
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 174038e to 7a6ec41 Compare July 23, 2026 21:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a6ec414ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts Outdated
Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-23-feat_sharing_accept_project_invites_in_sharing branch from 729dea0 to 1c95368 Compare July 24, 2026 06:35
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 7a6ec41 to 2acca65 Compare July 24, 2026 06:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2acca6520d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 2acca65 to a71f2c9 Compare July 24, 2026 06:54
@kunickiaj
kunickiaj force-pushed the 07-23-feat_sharing_accept_project_invites_in_sharing branch from 1c95368 to 1209bcd Compare July 24, 2026 06:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a71f2c9118

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-23-feat_sharing_accept_project_invites_in_sharing branch from 1209bcd to e0d6534 Compare July 24, 2026 07:02
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from a71f2c9 to 475727f Compare July 24, 2026 07:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 475727ffca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 475727f to 40e51d0 Compare July 24, 2026 07:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40e51d0a95

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts
@kunickiaj
kunickiaj force-pushed the 07-23-feat_sharing_accept_project_invites_in_sharing branch from e0d6534 to d219f47 Compare July 24, 2026 07:33
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 40e51d0 to 752522f Compare July 24, 2026 07:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 752522fd6c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 752522f to 8c62262 Compare July 24, 2026 07:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c622628d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 8c62262 to bc95cf2 Compare July 24, 2026 08:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc95cf2afc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch 2 times, most recently from b6057a6 to 8669982 Compare July 24, 2026 14:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8669982bd7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts
Comment thread packages/ui/src/tabs/sync/view-model/primary-status.ts
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 8669982 to 87cb8d9 Compare July 24, 2026 15:42

kunickiaj commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jul 24, 9:40 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 24, 9:52 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 24, 9:55 PM UTC: @kunickiaj merged this pull request with Graphite.

@kunickiaj
kunickiaj changed the base branch from 07-23-feat_sharing_accept_project_invites_in_sharing to graphite-base/1352 July 24, 2026 21:46
@kunickiaj
kunickiaj changed the base branch from graphite-base/1352 to main July 24, 2026 21:50
@kunickiaj
kunickiaj force-pushed the 07-23-fix_sync_show_truthful_primary_status branch from 87cb8d9 to 6e10f2e Compare July 24, 2026 21:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e10f2e5d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +77 to +81
return peers.some(
(peer) =>
peer.status?.sync_status === "ok" &&
derivePeerTrustSummary(peer).state === "mutual-trust" &&
!derivePeerScopeSyncView(peer).rows.some((scope) => scope.status === "pending"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Block health when any peer has pending scope delivery

Fresh evidence: the new per-Space guard is nested inside peers.some, so with one fully synchronized peer and a second trusted online peer whose authorized Space is still Pending, the first peer satisfies this predicate and the primary card still reports Healthy. Check pending scope delivery across all relevant peers before accepting any peer as proof of overall Project-sync health.

Useful? React with 👍 / 👎.

@kunickiaj
kunickiaj merged commit 3e4e90c into main Jul 24, 2026
13 checks passed
@kunickiaj
kunickiaj deleted the 07-23-fix_sync_show_truthful_primary_status branch July 24, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant