ui: version-display via JS, undo-toast centering, ctrl+enter save, test progress polish

* version: every span that shows v<APP_VERSION> in the page chrome now
  carries data-app-version, and checkAuth() patches them in from the
  /api/auth/status response so the GUI version doesn't go stale when
  PHP is cached behind anything that revalidates lazily.

* undo: tailwind v4 compiles `-translate-x-1/2` to the *new* CSS
  `translate` property, which then stacks with the inline `transform`
  the toast set — the box ended up shifted ~ -100% and looked left-
  anchored. Drop the tailwind utility, set `translate` directly inline
  so there's one source of truth for the offset.

* editor: ctrl/cmd+enter while the editor modal is open now invokes
  saveCard() (= save + close), pairing with the existing ctrl+s
  (save only) and ctrl+shift+s (save+close) shortcuts.

* collab buckets: drop the inset left edge from .bucket-tab-collab and
  the matching pulse-keyframe shadow — the bar tab now reads as a
  normal bucket tab, just with the unread dot + 3-cycle pulse on update.

* collab create dialog: drop the box border / background from
  .collab-toggle-row and .collab-members so the toggle and the user
  list sit directly on the modal background instead of looking like
  nested input boxes.

* test progress strip: ensureProgressBar() now also pushes the body
  down by 30px AND shrinks it via height: calc(100vh - 30px) so the
  fixed-top bar doesn't clip the footer (body is h-screen +
  overflow-hidden in the core layout). hideProgress() clears both
  inline styles when the run finishes.

chore: bump version to 0.9.2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.6 committed 2026-04-11 20:56:59 +02:00
1 parent fe3399a44b
commit 2059e50ce3
7 files changed
+39 -26

No files matched your search

+8
View File
@@ -158,6 +158,13 @@ async function checkAuth() {
const res = await fetch('api/auth/status');
const data = await res.json();
if (data.csrf) { setCsrf(data.csrf); window.hyprcrd?.util?.setCsrf?.(data.csrf); }
// Refresh version-displaying spans from the live API response so the
// GUI doesn't show a stale APP_VERSION when the PHP page is cached.
if (data.version) {
for (const el of document.querySelectorAll('[data-app-version]')) {
el.textContent = 'v' + data.version;
}
}
if (data.setup) {
let pw = null;
@@ -223,6 +230,7 @@ document.addEventListener('keydown', e => {
return;
}
if (e.key === 's' && (e.ctrlKey || e.metaKey) && modal.classList.contains('open')) { e.preventDefault(); e.shiftKey ? saveCard() : saveOnly(); return; }
if (e.key === 'Enter' && (e.ctrlKey || e.metaKey) && modal.classList.contains('open')) { e.preventDefault(); saveCard(); return; }
if (e.key === 'z' && (e.ctrlKey || e.metaKey) && !modal.classList.contains('open') && canUndo()) { e.preventDefault(); undo(); return; }
if (e.key === '/' && ![modal, detail, search, tasks].some(el => el?.classList.contains('open')) && document.activeElement === document.body) { e.preventDefault(); openSearch(); }
+11 -3
View File
@@ -66,21 +66,29 @@ export function pushBatch(label, patches) {
}
// Toast hint
//
// Centering note: tailwind v4 compiles `-translate-x-1/2` to the *new*
// CSS `translate` property, which then stacks with any inline `transform`
// we set — the box ended up shifted ~ -100% (utility translate + JS
// transform translate both applied) and looked left-anchored. Fix: drop
// the tailwind translate utility and centre purely via the modern
// `translate` property in inline styles, which is one source of truth.
let hintTimer = null;
function showHint(text) {
let el = document.getElementById('undo-hint');
if (!el) {
el = document.createElement('div');
el.id = 'undo-hint';
el.className = 'fixed bottom-16 left-1/2 -translate-x-1/2 z-[95] bg-t-surface border border-t-border px-4 py-2 text-xs font-pixel text-t-muted shadow-lg transition-all';
el.className = 'fixed bottom-16 left-1/2 z-[95] bg-t-surface border border-t-border px-4 py-2 text-xs font-pixel text-t-muted shadow-lg transition-all';
el.style.translate = '-50% 0';
document.body.appendChild(el);
}
el.textContent = text + ' (ctrl+z undo)';
el.style.opacity = '1';
el.style.transform = 'translateX(-50%) translateY(0)';
el.style.translate = '-50% 0';
clearTimeout(hintTimer);
hintTimer = setTimeout(() => {
el.style.opacity = '0';
el.style.transform = 'translateX(-50%) translateY(8px)';
el.style.translate = '-50% 8px';
}, 2500);
}