Skip to content

Sync settle inbox and reconcile subthread sidebar#238

Closed
wizzoapp[bot] wants to merge 7 commits into
mainfrom
wizzo/settle-sidebar-v2-subthreads
Closed

Sync settle inbox and reconcile subthread sidebar#238
wizzoapp[bot] wants to merge 7 commits into
mainfrom
wizzo/settle-sidebar-v2-subthreads

Conversation

@wizzoapp

@wizzoapp wizzoapp Bot commented Jul 22, 2026

Copy link
Copy Markdown

Design recommendation — independently settled subthreads, visually grouped

Adam deliberately withheld his preference, so this recommendation is based on workflow merits and is intentionally easy to redirect before approval.

  • A — settle a parent and all descendants as one unit: strongest visual cohesion, but a blocked/working child makes settlement non-atomic and bulk actions surprising.
  • B — settle subthreads independently, keep each root tree together, and show aggregate open descendants: preserves worker-level inbox semantics without orphaning children.
  • C — exempt subthreads and settle only top-level parents: smallest change, but completed workers permanently occupy the inbox and a settled parent can misrepresent live child work.

Recommendation implemented: B. Each row owns its settled state. A parent tree stays in the active inbox while any member is unsettled; settled members become slim rows in place; the parent reports its open-descendant count; only a fully settled tree moves as a group into the history tail. This lets completed workers clear independently while preserving parent context.

What this PR brings in

  • Syncs upstream's server-backed settle/inbox sidebar overhaul in its own first commit, followed by the fork reconciliation in the second commit.
  • Uses fork-safe migration 055 to add nullable settlement state. Existing rows remain intact and decode as unsettled; no historical thread is silently moved out of the inbox.
  • Enables sidebar v2 by default and disables automatic age-based settlement by default. Both settings controls remain available, including an explicit sidebar opt-out.
  • Makes light the default theme for the shared web/desktop renderer while preserving explicit saved light, dark, or system preferences.
  • Retains the fork's subthread tree expansion state, child indentation, active-route visibility, keyboard order, and whole-tree settled pagination.

Ephemeral UI proof

Captured against an ephemeral server using a SQLite .backup copy of the live state DB plus new synthetic parent/child fixtures. The live DB was never opened by the proof server.

Before settling After settling
Before settling After settling

Verification

  • Factory gate: full workspace typecheck, formatting/lint, and clean Codex autoreview
  • Full web unit suite plus focused mobile, server settlement/orchestration, contracts/settings, and desktop settings suites
  • Focused typechecks: contracts, web, mobile, server, and desktop
  • Isolated migrated-state browser proof in light mode, including settle before/after

Landing policy

Do not auto-merge. This PR requires Adam's manual design approval in addition to the normal CI, Codex review, and wizzo-approve conditions.

t3dotgg and others added 2 commits July 22, 2026 14:26
…cle (pingdotgg#4026)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 22, 2026 13:53

@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: 0c0a299539

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/web/src/components/Sidebar.logic.ts
Comment thread apps/server/src/orchestration/decider.ts Outdated
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
@wizzoapp
wizzoapp Bot marked this pull request as draft July 22, 2026 14:16
@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 22, 2026 14: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: 736303b741

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts Outdated
Comment thread apps/mobile/src/features/threads/threadListV2.ts Outdated
Comment thread apps/server/src/orchestration/decider.ts Outdated
Comment thread apps/web/src/components/SidebarV2.tsx
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
Comment thread apps/web/src/components/SidebarV2.tsx
@wizzoapp
wizzoapp Bot marked this pull request as draft July 22, 2026 15:05
@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 22, 2026 15:05

@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: a73d712e3f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/web/src/components/settings/BetaSettingsPanel.tsx
Comment thread apps/mobile/src/features/home/HomeScreen.tsx
Comment thread apps/server/src/orchestration/decider.ts
@wizzoapp
wizzoapp Bot marked this pull request as draft July 22, 2026 16:01
@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 22, 2026 16:02
@wizzoapp

wizzoapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Author

[from Codex]: Closing only to refresh the exhausted per-PR Codex review allowance after three completed reviews and a fourth eyes reaction stalled for 30 minutes. The same branch and combined diff will immediately continue in one fresh replacement PR; no scope is being split.

@wizzoapp wizzoapp Bot closed this Jul 22, 2026
@wizzoapp

wizzoapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Author

[from Codex]: Superseded by #239 from the identical branch/head solely to obtain a fresh Codex review. Continue approval and CI tracking there.

@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: a45e7b2ff8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +1213 to +1216
thread !== undefined &&
thread.settledOverride !== "settled" &&
serverConfigs.get(thread.environmentId)?.environment.capabilities.threadSettlement ===
true

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 Exclude blocked rows from bulk settle

When a multi-selection includes a row that is still running or waiting on approval/input, this filter still counts it as settleable because it only checks the override and server capability. Choosing Settle then clears the selection and dispatches attemptSettle for rows that useThreadActions.settleThread immediately rejects via canSettle, producing failure toasts instead of applying the action to the valid subset; filter with the same settle preflight before building the bulk action.

Useful? React with 👍 / 👎.

Comment on lines +1336 to +1338
{ id: "rename", label: "Rename thread" },
{ id: "mark-unread", label: "Mark unread" },
{ id: "delete", label: "Delete", destructive: true, icon: "trash" },

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 Restore archive access in v2 rows

With sidebarV2Enabled now defaulting on, this v2 row menu no longer exposes the archiveThread action—the menu goes from Rename/Mark unread directly to Delete, and the v2 bulk menu likewise has no Archive item. Because archived threads are still filtered out of this sidebar and only manageable after they have already been archived, users in the default v2 UI have no way to move a thread into the Archive without disabling v2; carry over the archive action or provide an equivalent path.

Useful? React with 👍 / 👎.

{prStateReporterThreads.map((thread) => {
const projectCwd =
projectCwdByKey.get(`${thread.environmentId}:${thread.projectId}`) ?? null;
if (thread.branch === null || (thread.worktreePath ?? projectCwd) === null) return null;

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 Clear stale PR state when reporters unmount

When a hidden descendant previously reported a closed or merged PR and then loses its branch or usable cwd, this guard stops rendering the non-row reporter, but the web reporter only writes to changeRequestStateByKey and never clears its key on unmount. That stale closed/merged entry is still read by effectiveSettled, so a now-branchless collapsed thread can remain classified in the settled tail until it is expanded/rendered; clear the key on reporter unmount or report null before skipping.

Useful? React with 👍 / 👎.

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