[PR #7226] [MERGED] fix(chat): say why trash rows pause while a restore runs #7633

Closed
opened 2026-10-24 04:06:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7226
Author: @SpicyMarinara
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/trash-busy-status-7210


📝 Commits (3)

  • 6222159 fix(chat): say why trash rows pause while a restore runs
  • 123da83 Merge remote-tracking branch 'origin/staging' into fix/trash-busy-status-7210
  • 05e14ca Merge origin/staging into fix/trash-busy-status-7210

📊 Changes

4 files changed (+21 additions, -0 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 e2e/message-trash-responsive.e2e.ts (+9 -0)
📝 packages/client/src/components/chat/ChatMessageMarksPanels.tsx (+9 -0)
📝 packages/client/src/localization/locales/en.json (+2 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Refs #7210 (follow-up to #7218; the maintainer approved this status line on 2026-10-07)

Why this change

  • #7218 made a 5,001-entry message trash responsive. While a restore or delete runs, the rows dim and their buttons stay focusable, but a busy guard ignores presses. Disabling every row button instead froze WebKit for about 2 s.
  • Nothing told anyone why the row buttons stopped responding. A screen reader user got no signal at all, because the dimming cover is aria-hidden and aria-busy is not announced reliably. A sighted user scrolled halfway down the list saw only dimmed rows.

What changed

  • ChatTrashList (packages/client/src/components/chat/ChatMessageMarksPanels.tsx) now has one role="status" / aria-live="polite" element between the header and the list. It is always on the page and empty while idle, so the text change is announced. While busy it shows Restoring messages… or Deleting messages…. The existing result toast still reports the outcome.
  • The status is a zero-height sticky element. Its small note floats over the dimmed rows at the top of whatever part of the list is in view, so the list never moves and the note stays visible when the list is scrolled. It is a single element outside the row list, so rows don't re-render or restyle (the #7210 row-render and mutation checks still pass unchanged). It uses theme tokens only (--background, --foreground, --border). Long translations wrap inside the panel.
  • Two English keys: ui.chat.messagetrash.restoring and ui.chat.messagetrash.deleting. No community locale files touched.
  • e2e/message-trash-responsive.e2e.ts: new assertions only. The status exists and is empty before the restore, reads "Restoring messages…" and is visible while the restore is held, the list's top doesn't move, and the status is empty again afterwards. No existing assertion changed. Without the component change the new assertions fail (getByRole('status') not found).
  • CHANGELOG entry under [Unreleased].

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Agent-run checks (for reference; boxes above are left for the human reviewer):

  • pnpm check: passed (includes pnpm localization:check, format, lint, e2e types, build).
  • pnpm localization:check: passed.
  • message-trash-responsive, message-trash-batching, message-marks-trash, chat-settings-tools with --workers=1:
    • desktop-chromium: 6/6 passed.
    • mobile-webkit: 6/6 passed on the first run. On the rerun after a CSS-only tweak, 5/6 passed. The message-trash-batching "conflicts-only" test timed out waiting for 5,001 rows to refill (4,600 seen at 10 s). That test doesn't touch the new status, and it then passed 3/3 with --repeat-each=3. It looks like a timing flake under machine load, not a regression.
  • Independent verification (after merging the latest staging, which only conflicted in CHANGELOG.md; every entry kept):
    • The four trash specs above with --workers=1 --repeat-each=3: desktop-chromium 18/18 passed, mobile-webkit 18/18 passed (including the message-trash-batching "conflicts-only" test all 3 times).
    • A temporary 5,001-entry check (removed afterwards) confirmed: the status is role="status" with aria-live="polite", is on the page and empty before anything runs, and has no aria-hidden, aria-busy, inert or hidden ancestor; it reads "Restoring messages…" for Restore all and a row's Restore, and "Deleting messages…" for a row's Delete forever and Empty trash; it clears afterwards; the toast wording differs; the note's text and background reach about 18:1 (light) and 12:1 (dark) contrast; it stays inside the panel below the header buttons, and stays in view with the list scrolled to row 2,500. Row render counts stay unchanged during the restores.
    • Busy timing on mobile-webkit with 5,001 entries matches the base commit within run-to-run noise: about 8 ms from the click to busy, and roughly 0.3–0.7 s from the server reply to idle, in both.
    • After the staging merge: pnpm check passed (exit 0), pnpm version:check passed, and message-trash-responsive plus message-marks-trash passed again on desktop-chromium and mobile-webkit (6/6).
  • Local CodeRabbit review: not run. The CLI returned rate_limit (all 3 reviews in the window used, about 49 min wait). The GitHub CodeRabbit review needs to run on this PR.

Manual verification notes

  • Manually verify in a browser: open a chat with a few messages in the trash (Chat Settings → message search → Trash). Click Restore all and confirm a small "Restoring messages…" note appears over the dimmed entries and disappears when the result toast shows.
  • Manually verify with a large trash (thousands of entries, or throttle the network in devtools): scroll halfway down the list, click a row's Restore, and confirm the note shows at the top of the visible part of the list. Confirm the list doesn't jump when the note appears or disappears.
  • Manually verify Empty trash (click twice) and a row's Delete forever (click twice) show "Deleting messages…" while they run.
  • Manually verify with a screen reader (VoiceOver on macOS/iOS or NVDA on Windows): start a restore and confirm "Restoring messages…" is announced once, followed by the result toast. Confirm nothing is announced when it clears, and that pressing a row's Restore during the restore does nothing.
  • Manually verify light and dark mode and a custom theme: the note uses theme colours and stays readable over the dimmed rows.
  • Manually verify on a phone-width viewport: the note fits inside the panel and doesn't cover the header buttons.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

CHANGELOG [Unreleased] has a new entry. No docs/ pages changed.

UI evidence (if applicable)

No screenshots are attached. Screenshots were checked locally (desktop-chromium and mobile-webkit, light and dark): the note shows over the dimmed first rows at the top of the list, and stays pinned to the top of the view when the list is scrolled. Long translated text wraps inside the panel width. In dark mode the panel background is slightly see-through, so dimmed row text shows faintly behind the note; the note stays readable.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7226 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/trash-busy-status-7210` --- ### 📝 Commits (3) - [`6222159`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6222159fadb8a1be59704868eb08bfb279a27582) fix(chat): say why trash rows pause while a restore runs - [`123da83`](https://github.com/Pasta-Devs/Marinara-Engine/commit/123da839c9a774bf851c96731420b092ad622aa7) Merge remote-tracking branch 'origin/staging' into fix/trash-busy-status-7210 - [`05e14ca`](https://github.com/Pasta-Devs/Marinara-Engine/commit/05e14ca8e2b6a5e1e619d77cf239210de05af888) Merge origin/staging into fix/trash-busy-status-7210 ### 📊 Changes **4 files changed** (+21 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `e2e/message-trash-responsive.e2e.ts` (+9 -0) 📝 `packages/client/src/components/chat/ChatMessageMarksPanels.tsx` (+9 -0) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Refs #7210 (follow-up to #7218; the maintainer approved this status line on 2026-10-07) ## Why this change - #7218 made a 5,001-entry message trash responsive. While a restore or delete runs, the rows dim and their buttons stay focusable, but a busy guard ignores presses. Disabling every row button instead froze WebKit for about 2 s. - Nothing told anyone why the row buttons stopped responding. A screen reader user got no signal at all, because the dimming cover is `aria-hidden` and `aria-busy` is not announced reliably. A sighted user scrolled halfway down the list saw only dimmed rows. ## What changed - `ChatTrashList` (`packages/client/src/components/chat/ChatMessageMarksPanels.tsx`) now has one `role="status"` / `aria-live="polite"` element between the header and the list. It is always on the page and empty while idle, so the text change is announced. While busy it shows **Restoring messages…** or **Deleting messages…**. The existing result toast still reports the outcome. - The status is a zero-height sticky element. Its small note floats over the dimmed rows at the top of whatever part of the list is in view, so the list never moves and the note stays visible when the list is scrolled. It is a single element outside the row list, so rows don't re-render or restyle (the #7210 row-render and mutation checks still pass unchanged). It uses theme tokens only (`--background`, `--foreground`, `--border`). Long translations wrap inside the panel. - Two English keys: `ui.chat.messagetrash.restoring` and `ui.chat.messagetrash.deleting`. No community locale files touched. - `e2e/message-trash-responsive.e2e.ts`: new assertions only. The status exists and is empty before the restore, reads "Restoring messages…" and is visible while the restore is held, the list's top doesn't move, and the status is empty again afterwards. No existing assertion changed. Without the component change the new assertions fail (`getByRole('status')` not found). - CHANGELOG entry under `[Unreleased]`. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Agent-run checks (for reference; boxes above are left for the human reviewer): - `pnpm check`: passed (includes `pnpm localization:check`, format, lint, e2e types, build). - `pnpm localization:check`: passed. - `message-trash-responsive`, `message-trash-batching`, `message-marks-trash`, `chat-settings-tools` with `--workers=1`: - desktop-chromium: 6/6 passed. - mobile-webkit: 6/6 passed on the first run. On the rerun after a CSS-only tweak, 5/6 passed. The `message-trash-batching` "conflicts-only" test timed out waiting for 5,001 rows to refill (4,600 seen at 10 s). That test doesn't touch the new status, and it then passed 3/3 with `--repeat-each=3`. It looks like a timing flake under machine load, not a regression. - Independent verification (after merging the latest `staging`, which only conflicted in `CHANGELOG.md`; every entry kept): - The four trash specs above with `--workers=1 --repeat-each=3`: desktop-chromium 18/18 passed, mobile-webkit 18/18 passed (including the `message-trash-batching` "conflicts-only" test all 3 times). - A temporary 5,001-entry check (removed afterwards) confirmed: the status is `role="status"` with `aria-live="polite"`, is on the page and empty before anything runs, and has no `aria-hidden`, `aria-busy`, `inert` or hidden ancestor; it reads "Restoring messages…" for **Restore all** and a row's **Restore**, and "Deleting messages…" for a row's **Delete forever** and **Empty trash**; it clears afterwards; the toast wording differs; the note's text and background reach about 18:1 (light) and 12:1 (dark) contrast; it stays inside the panel below the header buttons, and stays in view with the list scrolled to row 2,500. Row render counts stay unchanged during the restores. - Busy timing on mobile-webkit with 5,001 entries matches the base commit within run-to-run noise: about 8 ms from the click to busy, and roughly 0.3–0.7 s from the server reply to idle, in both. - After the `staging` merge: `pnpm check` passed (exit 0), `pnpm version:check` passed, and `message-trash-responsive` plus `message-marks-trash` passed again on desktop-chromium and mobile-webkit (6/6). - Local CodeRabbit review: **not run**. The CLI returned `rate_limit` (all 3 reviews in the window used, about 49 min wait). The GitHub CodeRabbit review needs to run on this PR. ### Manual verification notes - Manually verify in a browser: open a chat with a few messages in the trash (Chat Settings → message search → **Trash**). Click **Restore all** and confirm a small "Restoring messages…" note appears over the dimmed entries and disappears when the result toast shows. - Manually verify with a large trash (thousands of entries, or throttle the network in devtools): scroll halfway down the list, click a row's **Restore**, and confirm the note shows at the top of the visible part of the list. Confirm the list doesn't jump when the note appears or disappears. - Manually verify **Empty trash** (click twice) and a row's **Delete forever** (click twice) show "Deleting messages…" while they run. - Manually verify with a screen reader (VoiceOver on macOS/iOS or NVDA on Windows): start a restore and confirm "Restoring messages…" is announced once, followed by the result toast. Confirm nothing is announced when it clears, and that pressing a row's Restore during the restore does nothing. - Manually verify light and dark mode and a custom theme: the note uses theme colours and stays readable over the dimmed rows. - Manually verify on a phone-width viewport: the note fits inside the panel and doesn't cover the header buttons. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) CHANGELOG `[Unreleased]` has a new entry. No `docs/` pages changed. ## UI evidence (if applicable) No screenshots are attached. Screenshots were checked locally (desktop-chromium and mobile-webkit, light and dark): the note shows over the dimmed first rows at the top of the list, and stays pinned to the top of the view when the list is scrolled. Long translated text wraps inside the panel width. In dark mode the panel background is slightly see-through, so dimmed row text shows faintly behind the note; the note stays readable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:06:01 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7633
No description provided.