t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[codex] add automatic thread labels

Open mtdewwolf opened this issue 3 months ago • 3 comments

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.

mtdewwolf avatar Aug 06 '26 00:08 mtdewwolf

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.

[!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.

coderabbitai[bot] avatar Aug 06 '26 00:08 coderabbitai[bot]

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.

macroscopeapp[bot] avatar Aug 06 '26 00:08 macroscopeapp[bot]