Skip to content

[codex] add automatic thread labels - #5461

Open
mtdewwolf wants to merge 5 commits into
pingdotgg:mainfrom
mtdewwolf:codex/thread-labels
Open

[codex] add automatic thread labels#5461
mtdewwolf wants to merge 5 commits into
pingdotgg:mainfrom
mtdewwolf:codex/thread-labels

Conversation

@mtdewwolf

@mtdewwolf mtdewwolf commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Thread labels are now durable, automatically generated metadata for the existing thread lifecycle.

  • Adds the canonical bug, feature, review, and new-build labels to contracts, event decisions, projections, SQLite persistence, and migration coverage.
  • Generates a title and label on first turn and during title regeneration while preserving manually assigned labels.
  • Adds manual label actions, label filtering, and label badges across web and mobile thread lists.
  • Documents the feature and includes the requested before/after UI screenshots.

Why

Threads previously had no durable category, making it difficult to scan, filter, and recover the intent of a large thread list. This keeps classification close to the existing title-generation flow, persists it through the event-sourced server, and exposes the same behavior across clients.

Screenshots

Before After
Thread without a label Thread with the Feature label

Validation

  • vp test run --exclude '**/.t3/**' apps/server/src/orchestration/decider.labels.test.ts apps/server/src/orchestration/projector.labels.test.ts apps/server/src/persistence/Migrations/037_ProjectionThreadsLabels.test.ts apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.ts apps/server/src/persistence/Layers/ProjectionRepositories.test.ts — 5 files, 17 tests passed.
  • vp test run --exclude '**/.t3/**' apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts apps/server/src/textGeneration/TextGenerationPrompts.test.ts packages/shared/src/threadLabels.test.ts packages/client-runtime/src/state/threadReducer.test.ts apps/mobile/src/features/home/home-list-filter-menu.test.ts — 5 files, 101 tests passed.
  • git diff --check FETCH_HEAD...HEAD — clean.

Model/harness: GPT-5.6 Luna via Cursor CLI.

Made with Cursor

Note

Add automatic thread label assignment and label filtering across web and mobile

  • Introduces a constrained ThreadLabel type (bug, feature, review, new-build) in packages/contracts/src/thread.ts and shared display utilities in packages/shared/src/threadLabels.ts.
  • LLM title-generation prompts (Claude, Codex, Cursor, Grok, OpenCode) are updated to also return a label; the first-turn and regeneration flows in ProviderCommandReactor apply the label to unlabeled threads via thread.meta.update with compare-and-set semantics.
  • A SQLite migration (037_ProjectionThreadsLabels) adds a nullable label column to projection_threads; the projection pipeline, snapshot queries, and repositories all read/write this column.
  • Web sidebar (v1 and v2) and mobile thread list rows display a label badge and expose a context-menu action to set or clear a label when the environment advertises threadLabels: true capability.
  • Home screen, sidebar, and thread navigation sidebar all gain a Label filter menu to scope the visible thread list to a single label, hiding pending tasks when a label filter is active.
  • Risk: existing thread rows will have label: null until the migration runs and the server re-generates or a user manually assigns a label.

Macroscope summarized 66e44fe.

Persist and generate durable thread labels, expose them across web and mobile clients, and add filtering, manual actions, migration coverage, and review screenshots.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e17a40c-7f86-41e4-bcc2-5d874bb75b80

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Aug 6, 2026
Comment thread apps/mobile/src/features/home/HomeScreen.tsx
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts Outdated
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts Outdated
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
Comment thread apps/mobile/src/features/home/HomeRouteScreen.tsx
@macroscopeapp

macroscopeapp Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new thread labels feature with AI-generated classification, manual label management, and filtering across mobile and web apps. The scope includes database migration, modified text generation prompts, and cross-platform UI changes - substantial new functionality that warrants human review.

You can customize Macroscope's approvability policy. Learn more.

mtdewwolf and others added 2 commits August 5, 2026 18:52
Preserve inferred labels when title regeneration leaves the title unchanged, protect first-turn labels with compare-and-set semantics, and hide unlabeled pending tasks while a mobile label filter is active.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reset the settled thread page when the active label filter changes so filtered history starts from the first page on web and mobile.

Co-authored-by: Cursor <cursoragent@cursor.com>

@mtdewwolf mtdewwolf left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e6ee5c6. Configure here.

Comment thread apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
Keep navigation sidebar pending tasks consistent with filtered thread lists in both legacy groups and the v2 list.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant