Skip to content

feat(memory): scope inbox list queries by channel - #65

Merged
monatis merged 3 commits into
mainfrom
feat/altai-scoped-inbox-queries
Jul 20, 2026
Merged

feat(memory): scope inbox list queries by channel#65
monatis merged 3 commits into
mainfrom
feat/altai-scoped-inbox-queries

Conversation

@efecnc

@efecnc efecnc commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an optional host-channel filter to persisted notification, background-job, and clarification-ticket list queries
  • apply the filter in SQLite before ordering and limiting results
  • expose the filter through the API list endpoints for jobs and notifications

Why

Host integrations must not fetch a global fixed-size list and filter it after the fact. A busy terminal/API channel could otherwise make ALTAI’s inbox appear empty even when it has items.

Verification

  • cargo test channel_scoped_inbox_query_filters_before_limit --lib
  • cargo check --all-targets

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces channel-based filtering for background jobs, notifications, and clarification tickets to prevent cross-channel starvation and pollution. It updates the MemoryMessage enum, SQLite actor queries, and API endpoints to support an optional channel parameter, and adds a corresponding unit test. The reviewer feedback suggests that instead of passing None for the channel filter in the agent logic and terminal UI, these queries should be explicitly scoped to the active channel (using inbound.channel and config.channel_name respectively) to ensure proper isolation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/agent/mod.rs
Comment thread src/agent/mod.rs
Comment thread src/channels/terminal_ui/run.rs
Comment thread src/channels/terminal_ui/run.rs
@efecnc
efecnc force-pushed the feat/altai-scoped-inbox-queries branch from 5237e89 to 568b652 Compare July 20, 2026 18:50
@efecnc

efecnc commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Good catch. The channel filter remains optional for host-specific inboxes (including ALTAI), but native terminal polling and same-chat background recovery now keep channel unset so cross-channel notifications and jobs remain visible. Verified with cargo test --all-targets and cargo check --all-targets.

@monatis
monatis merged commit c8fed80 into main Jul 20, 2026
1 check passed
@monatis
monatis deleted the feat/altai-scoped-inbox-queries branch July 23, 2026 10:57
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.

2 participants