Skip to content

🛋️ feat: Open Subagents Directly from Background Tasks - #17020

Merged
danny-avila merged 12 commits into
devfrom
lia/subagent-popup-window
Oct 17, 2026
Merged

danny-avila merged 12 commits into
devfrom
lia/subagent-popup-window

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The background-task popup's subagent arrow only scrolls to the dispatch call, which fails when that message is not loaded. It now opens the requested durable subagent task directly, without changing the visible chat. The action is labeled “Open subagent”; the popup gains no explanatory footer.

Durable activity retains its own parent context, draft, and accumulated live text/tool activity when the visible conversation changes. Navigation releases parent-stream ownership without clearing the selected task; leaving the chat host clears every invocation. A separate “Go to parent chat” control navigates only when requested. This first slice uses the existing resizable side panel; it does not introduce a second draggable-window implementation. Foreground-only activity still closes on navigation, and leaving the authenticated chat host clears the selection.

How it works

Popup row (thread + task)
  durableSubagentSelection
    existing panel host
      task-owned parent context
      authorized thread query and activity stream

Tool rows keep their existing scroll-to-call behavior. Event-origin subagents retain the actor timeline and pin the requested task. Opening transfers keyboard focus to the panel; closing can return to the task disclosure when the call is not rendered.

Type of change

  • Feature
  • Tests / tooling / CI

Testing

Latest head: 530b737474a8b91c1f90a01e9ef4eb4c39a5bb8b.

The permission-grant scenario records notification tags and asserts exactly one for its target conversation, rather than counting unrelated reply alerts from shared user history. It observes that reply’s unread dot before granting permission and confirms no notifications were constructed while permission was pending. It reuses the persisted reply timestamp. Production notification code is unchanged.

Passed locally:

  • Real tracked Playwright permission-grant scenario, Chromium, normal polling cadence.
  • Diagnostic browser run with older unread history outside the initial sidebar page. Constructor breakpoints confirmed distinct target and unrelated conversation tags; the target notified exactly once.
  • 95 tests across notification-alert, unseen-conversation, and reply-watcher suites.
  • Scenario formatting and whitespace checks. Frontend dependency packages and frontend app built successfully.

Client npx tsc --noEmit passed. Independent review of this exact head completed with no findings. CI client typechecking, package/Vite builds, API runtime smoke, and Lighthouse passed. The replacement browser shard 8/10 and other test/static lanes are still running, so the earlier CI failure is not yet confirmed cleared. Full Playwright suites and Lighthouse were not run locally.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 79440a1ef65b7a182ff9b6ca406d44c6095ae39f. Opens durable subagents directly from the task popup, preserves task-owned context across chat navigation, and separates parent-chat navigation. Uses the current resizable host; no popup footer or competing window shell. Independent review is running for this head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 07032432c01d54a8a85cd88e60daa8f3f2b64cee. Uses route reconciliation for explicit parent navigation, keeps automatic task advancement from stealing chat focus, and reuses parent discovery until the panel and visible chat diverge. Adds transition coverage and fixes the initial CI type/lint diagnostics.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: e28a064bfe9e9f9369c35287982053351d0bbb1f. Guards retained task identity against dispatch synchronization and delayed event refreshes, preserves mounted live-state readers across navigation cleanup, and skips hidden or disabled return-focus targets. Includes regression coverage for each transition.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: e21c364ec98a843432916ac3bfbe243238403ebd. Focused verification passes: 416 tests across 11 suites, covering task opening, navigation retention, live progress, dispatch identity, and focus. Includes the corrected icon stub and direct-store observation in the test harness.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 2283119b258b4f266711a666df6b80be193d63e8. Preserves accumulated text and tool activity for the selected durable task during chat navigation, releases parent-stream ownership, and keeps final host teardown unconditional. Adds real drain regressions for tool/event tasks and caller coverage for navigation versus teardown.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: e9bc679e21942126b37c35d8285d6d5fa17efd17, integrated with current dev (8829a3975c14). Retains selected task activity across navigation and restores the core progress-key import after the step-handler migration. Local verification: 568 tests across 22 focused suites, client tsc --noEmit, scoped ESLint, formatting/imports, JSON, and localization checks passed. Independent review will cover this exact integrated head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Reviewed head: e9bc679e21942126b37c35d8285d6d5fa17efd17. Independent review complete: no findings. Previous P1 navigation-settings, P2 task identity/activity, and P3 focus findings are fixed; no rejections. Local: 568 tests / 22 suites, client tsc --noEmit, scoped ESLint, formatting/imports, JSON, localization, and whitespace checks passed. CI typechecking, static checks, package/Vite builds, and Lighthouse passed; Ubuntu tests and memory/Redis e2e lanes remain in progress.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T22:03:03.248811Z b408793 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

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

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread client/src/components/Chat/Subagents/SubagentThreadPanel.tsx Outdated
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: ed55a3f089d842b0008842abc70d48439f3fa154. Refreshes the saved external focus-return target on every explicit subagent open. Added mounted-panel regressions for switching to an unloaded task and reopening the same task. Local focused suites: 181 tests across 5 suites passed; client tsc --noEmit and scoped static checks passed. Independent review is running for this head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Reviewed head: ed55a3f089d842b0008842abc70d48439f3fa154. Independent review complete: no findings. Codex’s P2 focus-return finding is fixed and its thread resolved; none rejected. Local: 181 tests across five suites, client tsc --noEmit, scoped lint/static checks, and frontend dependency builds passed. CI typechecking, package/Vite builds, and Lighthouse passed; remaining checks are still running.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

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

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread client/src/components/Chat/Subagents/SubagentThreadPanel.tsx
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: b408793f58d16bcef7b5eaad657d1ce977e9f623. Prefers the actual opener on close even when its message card remains loaded. Desktop/mobile coverage verifies opener priority and unavailable-opener fallbacks. Local: 254 tests / seven suites, client tsc --noEmit, scoped ESLint/Prettier/import/JSON/localization checks passed. Independent review is running for this exact head.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Reviewed head: b408793f58d16bcef7b5eaad657d1ce977e9f623. Independent review complete: no findings. Both Codex P2 focus-return findings are fixed and resolved; none rejected. Local verification: 254 tests across seven suites, client tsc --noEmit, scoped lint/static checks, and frontend dependency builds passed. CI client typechecking, package/Vite builds, and Lighthouse passed. Static checks, Ubuntu tests, runtime smoke, and memory/Redis e2e remain in progress.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: b408793f58

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: dbc848a9b1d89182130558a591f2b8359e084264. Fixes the failed permission-grant notification scenario without changing production behavior or weakening its one-notification assertion. The fixture now reuses the real completed reply timestamp instead of advancing lastResponseAt twice. The failed browser trace showed distinct reply stamps; a disposable check of the actual alert hook produced one notification with a stable stamp and two when it advanced. Local notification/read-state/watcher suites: 95 tests passed; client tsc --noEmit and scenario formatting/lint passed. Fresh CI and independent review are running for this head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Reviewed head: dbc848a9b1d89182130558a591f2b8359e084264. Independent review complete: no findings. The CI-fixture correction keeps the persisted reply stamp stable and preserves the one-notification assertion; production notification behavior is unchanged. Local: 95 focused tests plus two real-hook timestamp checks, client tsc --noEmit, scenario lint/formatting, and focused Playwright discovery passed. CI client typechecking, package/Vite builds, and Lighthouse passed. The replacement memory shard 8/10 is still running; the original browser failure is not yet confirmed cleared.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 530b737474a8b91c1f90a01e9ef4eb4c39a5bb8b. The remaining permission-grant failure counted notifications for different conversations. A real browser reproduction with older unread history confirmed distinct notification tags at constructor breakpoints. The scenario now counts only its target tag and waits for that reply’s unread indicator before granting permission, so it verifies an observed withheld arrival and still rejects duplicate notifications for the target. The tracked scenario passed locally at its normal cadence; a diagnostic browser run with unrelated backlog also passed. Production notification code is unchanged. Fresh CI and independent review cover this head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Reviewed head: 530b737474a8b91c1f90a01e9ef4eb4c39a5bb8b. Independent review complete: no findings. Previous findings are fixed; none rejected. The tracked permission scenario passed locally at normal cadence, and browser stress coverage with unrelated unread history also passed. Local notification suites: 95 tests passed; client tsc --noEmit and scenario lint/formatting passed. CI typechecking, builds, runtime smoke, and Lighthouse passed. Replacement memory shard 8/10 remains in progress; the earlier CI failure is not yet confirmed cleared.

@danny-avila
danny-avila merged commit 147aa29 into dev Oct 17, 2026
35 checks passed
@danny-avila
danny-avila deleted the lia/subagent-popup-window branch October 17, 2026 04:58
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