summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/style.css
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-07 00:18:54 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-07 00:18:54 +0200
commit80ca7dd0765a6c08fa5ea54c2e14972bba6fa564 (patch)
tree29586935c58e870277d95f9f082a9abe941f3958 /packages/meshbay-hub/src/meshbay_hub/static/style.css
parent920284009d634cb568f95b3e93b93012c4b803bb (diff)
downloadmeshbay-80ca7dd0765a6c08fa5ea54c2e14972bba6fa564.tar.gz
fix(client): New folder did nothing — prompt() throws in the desktop client
The same `static/` tree is the web page and the application, and Electron does not implement `window.prompt`: Chromium leaves it to the embedder and Electron declines. It does not return null — it **throws**. The call sat above its own try, so clicking produced no folder, no error and nothing on screen to react to. A dead button, which is exactly how it was reported. Measured against this repo's own Electron 44 rather than assumed, because the first two diagnoses this session were reasoned and wrong: prompt('name?') -> Error: prompt() is not supported. confirm('sure?') -> opens a real modal alert('hi') -> opens a real modal So `confirm` and `alert` stay — a dozen call sites depend on them — and only `prompt` is banned. `test_no_prompt_in_the_spa.py` holds the whole tree to it, with the near-misses it must not flag (`mkdir_prompt`, `promptForName`). The name now comes from a field in the toolbar, which works in both clients and can show the node's refusal beside the input instead of after a dialog has closed. Navigating away drops a half-typed name: it would otherwise create the folder somewhere the person is no longer looking. The rest of the chain was verified end to end and was sound: `dir_create` {dir,name} → the node's handler → `dir_create_ack`, and `list_dirs` walks the filesystem rather than the index, so a folder with nothing in it appears on the very fetch that follows. The field itself was then driven inside a real Electron window — typing, Enter, the click, and the icon rendering. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011pvMdvLBG92jyhvD5pD6us
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/style.css')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/style.css12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/style.css b/packages/meshbay-hub/src/meshbay_hub/static/style.css
index 4647209..c5d5ce3 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/style.css
+++ b/packages/meshbay-hub/src/meshbay_hub/static/style.css
@@ -837,6 +837,18 @@ button:disabled { opacity: 0.5; cursor: not-allowed; }
beside it. The horizontal padding goes; the height does not, so it lines up
with the labelled buttons next to it. */
.tb-btn-icon { padding: 0; width: 32px; justify-content: center; gap: 0; }
+
+/* Naming a new folder, in the toolbar. Not `window.prompt`, which throws in
+ Electron — and an inline field can put the node's refusal next to the input
+ rather than after a dialog has closed. */
+.tb-mkdir { display: inline-flex; align-items: center; gap: 6px; }
+.tb-mkdir-input {
+ height: 32px; width: 170px; padding: 0 9px;
+ border: 1px solid var(--border-focus); border-radius: 6px;
+ background: var(--bg-surface); color: var(--text);
+ font-family: inherit; font-size: 0.83em;
+}
+.tb-mkdir-input:focus { outline: none; }
.tb-btn.primary {
background: var(--accent);
border-color: var(--accent);