Skip to content

Bucket chat threads by source#3330

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:fix/chat-thread-buckets
Jun 4, 2026
Merged

Bucket chat threads by source#3330
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:fix/chat-thread-buckets

Conversation

@senamakel
Copy link
Copy Markdown
Member

Summary

  • Replaces the chat thread filters with the three product buckets: General, Subconscious, and Tasks.
  • Preserves backwards compatibility by normalizing legacy labels like work, from_reflection, subconscious_tick, worker, and agent-task into the new buckets.
  • Routes newly generated subconscious threads to subconscious and task-board / worker / subagent threads to tasks.
  • Defaults the chat UI filter to General and tightens chip padding so the remaining labels fit on one line more easily.
  • Updates localized chat filter copy and focused tests for the new bucket behavior.

Problem

Chat threads were still organized around older labels (All, Work, Briefing, Notification, Workers) that no longer match the desired product model. Removing those filters outright would risk hiding historical threads unless legacy labels are folded into the new buckets.

Solution

The chat filter utility now classifies every thread into General, Subconscious, or Tasks. General is the fallback bucket for unlabeled and unknown historical labels, work remains compatible with General, legacy reflection/subconscious labels resolve to Subconscious, and worker / agent-task labels resolve to Tasks. Thread creation paths for subconscious and agent task-board generated work now persist the new canonical labels. The UI renders only the three buckets, defaults to General, and uses smaller horizontal chip padding.

Submission Checklist

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy
  • Diff coverage ≥ 80% — changed lines (Vitest + cargo-llvm-cov merged via diff-cover) meet the gate enforced by .github/workflows/pr-ci.yml. Run pnpm test:coverage and pnpm test:rust locally; PRs below 80% on changed lines will not merge. Focused changed-line tests were run locally; full merged coverage is left to CI for this UI/core slice.
  • Coverage matrix updated — added/removed/renamed feature rows in docs/TEST-COVERAGE-MATRIX.md reflect this change. N/A: bucket naming/filter behavior only; no feature row added, removed, or renamed.
  • All affected feature IDs from the matrix are listed in the PR description under ## Related. N/A: no coverage matrix feature IDs changed.
  • No new external network dependencies introduced (mock backend used per Testing Strategy)
  • Manual smoke checklist updated if this touches release-cut surfaces (docs/RELEASE-MANUAL-SMOKE.md). N/A: chat filter labeling change only; no release manual smoke steps changed.
  • Linked issue closed via Closes #NNN in the ## Related section. N/A: no linked issue was provided for this follow-up.

Impact

Desktop chat UI now shows General, Subconscious, and Tasks only. Existing stored labels remain readable through normalization, with unknown historical labels falling back to General rather than disappearing. No migration, network, or security impact is expected.

Related

  • Closes: N/A — no linked issue was provided.
  • Follow-up PR(s)/TODOs: N/A

AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fix/chat-thread-buckets
  • Commit SHA: bd8248a6b

Validation Run

  • pnpm --filter openhuman-app format:check via pre-push hook
  • pnpm typecheck via pre-push hook
  • Focused tests: pnpm debug unit src/pages/conversations/utils/threadFilter.test.ts src/pages/__tests__/Conversations.render.test.tsx src/components/intelligence/__tests__/IntelligenceTasksTab.test.tsx
  • Rust fmt/check (if changed): cargo fmt --manifest-path Cargo.toml --check; pnpm rust:check via pre-push hook; targeted Rust tests listed below
  • Tauri fmt/check (if changed): pnpm rust:check via pre-push hook

Additional validation:

  • pnpm --dir app exec tsx ../scripts/i18n-coverage.ts --json --no-unused
  • git diff --check
  • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml store_handles_labels_and_inference --lib
  • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml persist_worker_thread_creates_thread_with_tasks_label_and_messages --lib
  • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml rejects_if_already_worker_thread --lib
  • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml spawn_worker_thread_tool_persists_worker_thread_e2e --lib
  • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml creates_child_thread_linked_to_parent_and_seeds_prompt --lib
  • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml rejects_if_has_parent_thread_id --lib

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: N/A

Behavior Changes

  • Intended behavior change: Chat thread filters are now General, Subconscious, and Tasks only; new generated thread sources persist canonical labels for those buckets.
  • User-visible effect: The chat filter bar is shorter, defaults to General, and no longer exposes All, Briefing, Notification, or Workers.

Parity Contract

  • Legacy behavior preserved: Historical labels normalize into the new buckets (work -> General; reflection/subconscious labels -> Subconscious; worker/task labels -> Tasks), with unknown/unlabeled threads falling back to General.
  • Guard/fallback/dispatch parity checks: Focused Vitest coverage verifies UI defaults/filter visibility; Rust tests verify stored label normalization and generated worker/subagent task labeling.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): N/A
  • Canonical PR: this PR
  • Resolution (closed/superseded/updated): N/A

@senamakel senamakel requested a review from a team June 4, 2026 02:31
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

Warning

Review limit reached

@senamakel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 11 minutes and 55 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4e12b094-7902-45c3-8994-0769edb16786

📥 Commits

Reviewing files that changed from the base of the PR and between 20b6007 and bd8248a.

📒 Files selected for processing (29)
  • app/src/components/PillTabBar.tsx
  • app/src/components/intelligence/IntelligenceTasksTab.tsx
  • app/src/components/intelligence/__tests__/IntelligenceTasksTab.test.tsx
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/pages/Conversations.tsx
  • app/src/pages/__tests__/Conversations.render.test.tsx
  • app/src/pages/conversations/utils/threadFilter.test.ts
  • app/src/pages/conversations/utils/threadFilter.ts
  • src/openhuman/agent_orchestration/tools/spawn_subagent.rs
  • src/openhuman/agent_orchestration/tools/spawn_worker_thread.rs
  • src/openhuman/agent_orchestration/tools/tools_e2e_tests.rs
  • src/openhuman/agent_orchestration/tools/worker_thread.rs
  • src/openhuman/memory_conversations/store.rs
  • src/openhuman/memory_conversations/store_tests.rs
  • src/openhuman/subconscious/engine.rs
  • src/openhuman/subconscious/schemas.rs

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

@senamakel senamakel merged commit 57dd868 into tinyhumansai:main Jun 4, 2026
19 checks passed
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