Skip to content

fix(code): keep notification center open for API-key entry - #4568

Merged
Mason Daugherty (mdrxy) merged 2 commits into
mainfrom
mdrxy/code/notification-esc-return
Jul 9, 2026
Merged

fix(code): keep notification center open for API-key entry#4568
Mason Daugherty (mdrxy) merged 2 commits into
mainfrom
mdrxy/code/notification-esc-return

Conversation

@mdrxy

@mdrxy Mason Daugherty (mdrxy) commented Jul 8, 2026

Copy link
Copy Markdown
Member

Pressing Esc in the API-key entry prompt reached from a notification now returns to the notification center instead of closing all open modals.


When a user opens the notification center with ctrl+n, selects a service notification, and chooses Enter API key, they are still working through that notification. If they decide not to enter a key yet, Esc should take them back to the notification details so they can review, suppress, or choose another notification — not drop them back into the main chat screen.

Before this change, selecting Enter API key dismissed the notification center before the API-key prompt opened. Because the center was already gone, pressing Esc in the prompt fell through to the base chat screen instead of returning to the notifications viewer.

For example:

  • Before:
    1. Press ctrl+n to open notifications.
    2. Open a Tavily API-key notification.
    3. Select Enter API key.
    4. Press Esc in the API-key prompt.
    5. The prompt closes and the user lands in the main chat screen, losing the notification context.
  • After:
    1. Press ctrl+n to open notifications.
    2. Open a Tavily API-key notification.
    3. Select Enter API key.
    4. Press Esc in the API-key prompt.
    5. The prompt closes and the user returns to the notification center, with the notification details still available.

The fix treats ENTER_API_KEY as an in-place action, mirroring the existing SUPPRESS handling: instead of dismissing the center, the detail modal posts a NotificationActionRequested message. The app handles it in a worker so the message pump is not blocked while the prompt awaits input, pushes the AuthPromptScreen on top of the still-mounted center, then reloads the center once the action resolves. Saving the key drops the notification entry, and the center dismisses only when the list becomes empty.

Made by Open SWE

Selecting "Enter API key" on a service notification (e.g. Tavily)
dismissed the notification center before the API-key prompt opened, so
Esc in that prompt fell through to the base chat screen instead of
returning to the notifications viewer. Treat `ENTER_API_KEY` as an
in-place action (like SUPPRESS): the center stays mounted, the prompt
stacks on top, and Esc returns to the center. The center reloads after
the action resolves, dropping the entry on save and dismissing when the
list empties.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@github-actions github-actions Bot added dcode Related to `deepagents-code` fix A bug fix (PATCH) internal User is a member of the `langchain-ai` GitHub organization size: M 200-499 LOC labels Jul 8, 2026
@mdrxy
Mason Daugherty (mdrxy) marked this pull request as ready for review July 8, 2026 20:21

@open-swe open-swe 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.

✅ Open SWE Review: No issues found

Open SWE reviewed this PR and found no potential bugs to report.

Open in WebView Open SWE trace

@mdrxy
Mason Daugherty (mdrxy) merged commit 6e89417 into main Jul 9, 2026
64 of 66 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/code/notification-esc-return branch July 9, 2026 00:27
Mason Daugherty (mdrxy) added a commit that referenced this pull request Jul 9, 2026
> [!CAUTION]
> Merging this PR will automatically publish to **PyPI** and create a
**GitHub release**.

For the full release process, see
[`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md).

---

_Everything below this line will be the GitHub release body._

---


##
[0.1.35](deepagents-code==0.1.34...deepagents-code==0.1.35)
(2026-07-09)

### Features

* Restore interrupted prompt to input on ESC
([#4544](#4544))
([fccf037](fccf037))
* Add `[startup].mode` default approval mode
([#4573](#4573))
([7c5bf54](7c5bf54))
* Offer restart after saving Tavily key via `/auth`
([#4560](#4560))
([12df81a](12df81a))
* Reload env from `/auth` modal via Ctrl+R
([#4566](#4566))
([f07d638](f07d638))
* Toast on saved `/auth` API key
([#4558](#4558))
([ee3c264](ee3c264))

### Bug Fixes

* Harden approval content rendering
([#4581](#4581))
([38446fd](38446fd))
* Preserve transcript order during virtualization
([#4549](#4549))
([f6ee70c](f6ee70c))
* Run stdio MCP server pre-flight check off the event loop
([#4434](#4434))
([c9636e2](c9636e2))
* Avoid duplicate "criteria ready" message on `/goal` revisions
([#4559](#4559))
([1110497](1110497))
* Restore welcome banner tips
([#4528](#4528))
([3f1e55e](3f1e55e))
* Clarify managed `rg` install failures
([#4578](#4578))
([434c84a](434c84a))
* Dedupe update/install log path output
([#4553](#4553))
([1398fee](1398fee))
* Keep notification center open for API-key entry
([#4568](#4568))
([6e89417](6e89417))
* Queue `/mcp login` sent before the server connects
([#4533](#4533))
([edac82c](edac82c))
* Serialize MCP OAuth token refreshes to prevent reuse revocation
([#4565](#4565))
([c37100d](c37100d))

---

_Everything above this line will be the GitHub release body._

---

> [!NOTE]
> A **New Contributors** section is appended to the GitHub release notes
automatically at publish time (see [Release
Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline),
step 2).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
Marcelo5444 pushed a commit to Marcelo5444/deepagents that referenced this pull request Jul 30, 2026
…-ai#4568)

Pressing `Esc` in the API-key entry prompt reached from a notification
now returns to the notification center instead of closing all open
modals.

---

When a user opens the notification center with `ctrl+n`, selects a
service notification, and chooses **Enter API key**, they are still
working through that notification. If they decide not to enter a key
yet, `Esc` should take them back to the notification details so they can
review, suppress, or choose another notification — not drop them back
into the main chat screen.

Before this change, selecting **Enter API key** dismissed the
notification center before the API-key prompt opened. Because the center
was already gone, pressing `Esc` in the prompt fell through to the base
chat screen instead of returning to the notifications viewer.

For example:

- Before:
  1. Press `ctrl+n` to open notifications.
  2. Open a Tavily API-key notification.
  3. Select **Enter API key**.
  4. Press `Esc` in the API-key prompt.
5. The prompt closes and the user lands in the main chat screen, losing
the notification context.
- After:
  1. Press `ctrl+n` to open notifications.
  2. Open a Tavily API-key notification.
  3. Select **Enter API key**.
  4. Press `Esc` in the API-key prompt.
5. The prompt closes and the user returns to the notification center,
with the notification details still available.

The fix treats `ENTER_API_KEY` as an in-place action, mirroring the
existing `SUPPRESS` handling: instead of dismissing the center, the
detail modal posts a `NotificationActionRequested` message. The app
handles it in a worker so the message pump is not blocked while the
prompt awaits input, pushes the `AuthPromptScreen` on top of the
still-mounted center, then reloads the center once the action resolves.
Saving the key drops the notification entry, and the center dismisses
only when the list becomes empty.

Made by [Open
SWE](https://openswe.vercel.app/agents/7f8edaca-58bc-3065-4243-6edc6d5d3449)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Marcelo5444 pushed a commit to Marcelo5444/deepagents that referenced this pull request Jul 30, 2026
> [!CAUTION]
> Merging this PR will automatically publish to **PyPI** and create a
**GitHub release**.

For the full release process, see
[`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md).

---

_Everything below this line will be the GitHub release body._

---


##
[0.1.35](langchain-ai/deepagents@deepagents-code==0.1.34...deepagents-code==0.1.35)
(2026-07-09)

### Features

* Restore interrupted prompt to input on ESC
([langchain-ai#4544](langchain-ai#4544))
([fccf037](langchain-ai@fccf037))
* Add `[startup].mode` default approval mode
([langchain-ai#4573](langchain-ai#4573))
([7c5bf54](langchain-ai@7c5bf54))
* Offer restart after saving Tavily key via `/auth`
([langchain-ai#4560](langchain-ai#4560))
([12df81a](langchain-ai@12df81a))
* Reload env from `/auth` modal via Ctrl+R
([langchain-ai#4566](langchain-ai#4566))
([f07d638](langchain-ai@f07d638))
* Toast on saved `/auth` API key
([langchain-ai#4558](langchain-ai#4558))
([ee3c264](langchain-ai@ee3c264))

### Bug Fixes

* Harden approval content rendering
([langchain-ai#4581](langchain-ai#4581))
([38446fd](langchain-ai@38446fd))
* Preserve transcript order during virtualization
([langchain-ai#4549](langchain-ai#4549))
([f6ee70c](langchain-ai@f6ee70c))
* Run stdio MCP server pre-flight check off the event loop
([langchain-ai#4434](langchain-ai#4434))
([c9636e2](langchain-ai@c9636e2))
* Avoid duplicate "criteria ready" message on `/goal` revisions
([langchain-ai#4559](langchain-ai#4559))
([1110497](langchain-ai@1110497))
* Restore welcome banner tips
([langchain-ai#4528](langchain-ai#4528))
([3f1e55e](langchain-ai@3f1e55e))
* Clarify managed `rg` install failures
([langchain-ai#4578](langchain-ai#4578))
([434c84a](langchain-ai@434c84a))
* Dedupe update/install log path output
([langchain-ai#4553](langchain-ai#4553))
([1398fee](langchain-ai@1398fee))
* Keep notification center open for API-key entry
([langchain-ai#4568](langchain-ai#4568))
([6e89417](langchain-ai@6e89417))
* Queue `/mcp login` sent before the server connects
([langchain-ai#4533](langchain-ai#4533))
([edac82c](langchain-ai@edac82c))
* Serialize MCP OAuth token refreshes to prevent reuse revocation
([langchain-ai#4565](langchain-ai#4565))
([c37100d](langchain-ai@c37100d))

---

_Everything above this line will be the GitHub release body._

---

> [!NOTE]
> A **New Contributors** section is appended to the GitHub release notes
automatically at publish time (see [Release
Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline),
step 2).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dcode Related to `deepagents-code` fix A bug fix (PATCH) internal User is a member of the `langchain-ai` GitHub organization size: M 200-499 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant