Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(view): every keystroke in the search looks in every state [N26]
Corey Olson53d5b5b00ce0
diff --git a/src/cockpit.js b/src/cockpit.jsindex 8639203c..317d6856 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -445,11 +445,18 @@ function pick(id) {if (matchMedia('(max-width: 900px)').matches) $('detail').scrollIntoView({ block: 'start', behavior: 'smooth' });}-/** A search looks through every state: All while the box has text, the chip from before once it is empty. */+/**+ * A search looks through every state. Each keystroke with text in the box selects All, even after a+ * chip was clicked mid-search; emptying the box brings back the chip from before the search began.+ */function search() {- const typed = Boolean($('q').value.trim());- if (typed && view.before == null) { view.before = view.state; view.state = 'all'; }- else if (!typed && view.before != null) { view.state = view.before; view.before = null; }+ if ($('q').value.trim()) {+ if (view.before == null) view.before = view.state;+ view.state = 'all';+ } else if (view.before != null) {+ view.state = view.before;+ view.before = null;+ }render();}diff --git a/test/cockpit.test.js b/test/cockpit.test.jsindex f029686f..b71e4358 100644--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@ -435,6 +435,17 @@ test('shout ids, search and narrow windows reach the item [N26]', async () => {await page.type('q', '');assert.equal(page.run('view.state'), 'active', 'clearing the search brings the chip back');assert.doesNotMatch(page.show('chain'), /Farewell banner/);++ // Type, click Active with the query still there, then edit the query to the verified title.+ await page.type('q', 'filler');+ assert.equal(page.run('view.state'), 'all');+ await page.click({ state: 'active' });+ assert.equal(page.run('view.state'), 'active', 'a chip clicked mid-search narrows the list');+ await page.type('q', 'farewell banner');+ assert.equal(page.run('view.state'), 'all', 'typing again searches every state');+ assert.match(page.show('chain'), /Farewell banner/, 'and finds the verified item');+ await page.type('q', '');+ assert.equal(page.run('view.state'), 'active', 'emptying the box brings back the chip from before the search');assert.doesNotMatch(page.show('chain'), /Retired widget/, 'browsing leaves withdrawn items out');await page.type('q', 'retired widget');const found = itemRow(page.show('chain'), 40);