fix: ESC doesn't kill panel mid-run, remove stale #inbox test
runner.js: the Escape handler now checks panel.style.display !== 'none' before closing. During the test run the panel is hidden (display:none) but the variable is truthy — synthetic Escape events dispatched by tests (e.g. "closes on ESC") were triggering close() mid-run, removing the panel entirely so results never showed. quick-capture.test.js: the "Enter creates card with #inbox tag" test was asserting found.tags contains 'inbox', but the #inbox auto-tag was removed in 0.9.17. Renamed to "Enter creates card in active bucket" and dropped the stale tags assertion. chore: bump version to 0.9.20 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c04eac06c4
commit
3eb5202aac
3 files changed
+3
-4
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
define('APP_NAME', 'hyprcrd');
|
||||
define('APP_VERSION', '0.9.19');
|
||||
define('APP_VERSION', '0.9.20');
|
||||
|
||||
// Database path — writable directory, outside webroot
|
||||
define('DB_PATH', __DIR__ . '/data/hyprcrd.db');
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('Quick Capture: Card Creation', () => {
|
||||
await closeAll();
|
||||
});
|
||||
|
||||
it('Enter creates card with #inbox tag', async () => {
|
||||
it('Enter creates card in active bucket', async () => {
|
||||
pressKey('n', { ctrlKey: true });
|
||||
await sleep(100);
|
||||
const input = $('#quick-capture-input');
|
||||
@@ -57,7 +57,6 @@ describe('Quick Capture: Card Creation', () => {
|
||||
const cards = await fetch('api/cards').then(r => r.json());
|
||||
const found = cards.find(c => c.title === '__test_quick_capture__');
|
||||
expect(found).toExist();
|
||||
expect(found.tags).toContain('inbox');
|
||||
});
|
||||
|
||||
it('capture bar closes after Enter', async () => {
|
||||
|
||||
@@ -496,7 +496,7 @@ document.addEventListener('keydown', e => {
|
||||
e.preventDefault();
|
||||
panel ? close() : open();
|
||||
}
|
||||
if (e.key === 'Escape' && panel) {
|
||||
if (e.key === 'Escape' && panel && panel.style.display !== 'none') {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
close();
|
||||
|
||||
Reference in new issue
Block a user