feat: search field of the history panel stands out (recess, focus border, magnifier)

Co-Authored-By: Ovis Fast (Claude) <[email protected]>
This commit is contained in:
FactorandOvis Fast committed 2026-11-19 12:34:00 +01:00
1 parent 44521e478d
commit 02d579c8b8
4 files changed
+87

No files matched your search

+14
View File
@@ -94,6 +94,7 @@ import {
shortPath,
stillSameAgent,
directSendBlocked,
fieldBackground,
blockTargetPx,
shouldResize,
isManualResize,
@@ -208,6 +209,7 @@ export default class Composer extends View {
// is picked, where the caret was when it opened, and the history as it was
// read then. Each tab has a search field of its own.
this.panel = null;
this.panelSearchFocused = false;
// The height of the composer block (reported by its root) and the height
// to give back when a panel that made the block taller closes.
this.blockHeight = null;
@@ -233,6 +235,15 @@ export default class Composer extends View {
cx.notify();
});
input.on("submit", (event, cx) => this.panelPick(this.panel?.index ?? 0, cx));
// The border of the search field lights up while it has the keyboard.
input.on("focus", (event, cx) => {
this.panelSearchFocused = true;
cx.notify();
});
input.on("blur", (event, cx) => {
this.panelSearchFocused = false;
cx.notify();
});
}
this.panelScroll = VirtualListScrollHandle.new();
this.favorites = storage.loadFavorites(this.store);
@@ -702,6 +713,7 @@ export default class Composer extends View {
if (!this.panel) return;
const { caret } = this.panel;
this.panel = null;
this.panelSearchFocused = false;
if (this.panelRestorePx !== null) {
this.resizeBlock(this.panelRestorePx);
this.panelRestorePx = null;
@@ -848,6 +860,8 @@ export default class Composer extends View {
query,
index,
input: this.panelInputs[tab],
searchFocused: this.panelSearchFocused,
fieldBackground: fieldBackground(theme(), theme().popover),
scroll: this.panelScroll,
isFavorite: (text) => isFavorite(this.favorites, text),
};