Skip to content

Add query ID and update notification badge to query list - #356

Merged
morishin merged 4 commits into
masterfrom
feature/query-list-id-and-update-mark
May 28, 2026
Merged

Add query ID and update notification badge to query list#356
morishin merged 4 commits into
masterfrom
feature/query-list-id-and-update-mark

Conversation

@morishin

@morishin morishin commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Purpose

  • Make it easy to see which queries to look at when returning to the window after they were updated while it was inactive (e.g. queries created/edited via MCP, or a long-running query that finished)
  • Make it easy to notice when a query you started finishes while you are looking at a different query
  • Make it easy to identify a query by its ID

What I did

  • Added an ID label to each item in the query list
  • Show a notification badge (blue dot) next to the ID on queries that were updated without the user actively watching them

Mark conditions

  • On window focus: the time the window became inactive (blur) is recorded. When the window regains focus, any query whose updatedAt is newer than that time gets marked. This covers anything that changed while you were away — MCP body edits, newly created queries, and executions that finished in the background.
  • On query execution completion: a query whose execution finishes while a different query is selected gets marked. (If you are watching the executing query, it is not marked.)

In-app edits made while the window is active are naturally excluded, because their updatedAt is older than the time the window later goes inactive.

Clear conditions

The badge is removed when:

  • The marked query is selected (clicked)
  • The user switches away from a previously selected marked query (the previously selected query's badge is also cleared on selection change)

The badge state is kept in memory only and is not persisted across app restarts.

Screenshot

スクリーンショット 2026-05-26 12 39 26

🤖 Generated with Claude Code

morishin and others added 2 commits May 26, 2026 12:08
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ctive

Track window blur timestamp and mark queries whose updatedAt is newer than
that timestamp when the window regains focus. The mark is cleared when the
query is selected, or when the previously selected query is moved away from.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@morishin
morishin marked this pull request as ready for review May 26, 2026 03:33
@morishin
morishin marked this pull request as draft May 26, 2026 03:35
…selected

Previously the mark was only added on window focus based on updatedAt. With
this change, a query whose execution completes while it is not the currently
selected query is also marked, so the user notices the result when switching
back to it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@morishin
morishin marked this pull request as ready for review May 26, 2026 03:40
@morishin
morishin marked this pull request as draft May 26, 2026 04:12
@morishin
morishin force-pushed the feature/query-list-id-and-update-mark branch from e77a4bb to d02866c Compare May 28, 2026 05:53
@morishin
morishin marked this pull request as ready for review May 28, 2026 06:02
Use a Set for the marked ids so duplicates are deduped automatically, and
fold the inactive-period guard into the filter predicate, dropping the
explicit includes check and the surrounding if block.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@morishin
morishin merged commit 9105ec2 into master May 28, 2026
2 checks passed
@morishin
morishin deleted the feature/query-list-id-and-update-mark branch May 28, 2026 06:20
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