From 42c0ef9c6391285d76825bdf0d29371cd6ebf500 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 10 Oct 2026 08:28:53 -0700 Subject: Composers: attach and GIF sit in the field's corner. The post composer's row had grown to Post · 📎 · GIF · Preview · Cancel; the reply box's likewise. The paperclip and GIF button are now small borderless tools inside the text field, bottom right (the field keeps room under its text so nothing runs beneath them), and the row under it is only what you do with the post: Post, Preview, Cancel (Preview, Cancel, Reply in a thread). Tests find the tools in .compose-box. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3 --- tools/gif-picker-test.js | 4 ++-- tools/post-actions-test.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/gif-picker-test.js b/tools/gif-picker-test.js index 956b4f7..f72cde3 100644 --- a/tools/gif-picker-test.js +++ b/tools/gif-picker-test.js @@ -53,8 +53,8 @@ try { await page.evaluate(() => document.querySelector('.app-nav-button[aria-label="Feed"]')?.click()); await waitFor(() => !!document.querySelector('.feed-post-fab'), 15000); await page.evaluate(() => document.querySelector('.feed-post-fab').click()); - check('the post composer has a GIF button', await waitFor(() => !!document.querySelector('.post-actions .gif-btn'), 8000)); - await page.evaluate(() => document.querySelector('.post-actions .gif-btn').click()); + check('the post composer has a GIF button', await waitFor(() => !!document.querySelector('.compose-box .gif-btn'), 8000)); + await page.evaluate(() => document.querySelector('.compose-box .gif-btn').click()); check('the picker opens with the nostr.build attribution, linked', await waitFor(() => !!document.querySelector('.gif-sheet .gif-head a[href="https://nostr.build"]'), 5000)); check('...and the first starter\'s GIFs', await waitFor(() => document.querySelectorAll('.gif-grid .gif-tile').length >= 6, 20000), String(await page.evaluate(() => document.querySelectorAll('.gif-tile').length))); check('a tile plays the small mp4, not the original', await waitFor(() => [...document.querySelectorAll('.gif-tile video')].some((v) => /mp4/.test(v.currentSrc || v.getAttribute('src') || '') && v.readyState >= 2), 15000)); diff --git a/tools/post-actions-test.js b/tools/post-actions-test.js index a33079e..766cfa3 100644 --- a/tools/post-actions-test.js +++ b/tools/post-actions-test.js @@ -93,10 +93,11 @@ try { const reply = await page.evaluate(() => { const box = document.querySelector('.thread-reply-input'); if (!box) return { box: false }; - const row = box.parentElement; + const row = box.closest('.thread-reply'); return { box: true, - attach: !!row.querySelector('.attach-btn'), + // in the field's corner now, beside the GIF button + attach: !!row.querySelector('.compose-box .compose-tool:not(.gif-btn)'), file: !!row.querySelector('#reply-file'), accepts: (row.querySelector('#reply-file') || {}).accept, }; -- cgit v1.2.3