fix(document-page): add .catch() to task deep-link tick promise
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 3m23s
CI / OCR Service Tests (pull_request) Successful in 29s
CI / Backend Unit Tests (pull_request) Failing after 3m0s
CI / Unit & Component Tests (push) Failing after 3m17s
CI / OCR Service Tests (push) Successful in 34s
CI / Backend Unit Tests (push) Failing after 3m19s

Addresses @felix — tick().then() had no error handler; console.error
is now logged on failure, matching the existing deep-link scroll pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-29 21:34:41 +02:00
parent 84ba728e08
commit a81a6e7253

View File

@@ -364,15 +364,17 @@ onMount(() => {
if (page.url.searchParams.get('task') === 'transcribe') {
transcribeMode = true;
tick().then(() => {
const closeBtn = document.querySelector<HTMLElement>('[data-testid="panel-close"]');
closeBtn?.scrollIntoView({
behavior: prefersReducedMotion ? 'instant' : 'smooth',
block: 'nearest'
});
closeBtn?.focus({ preventScroll: true });
replaceState(page.url.pathname, page.state ?? {});
});
tick()
.then(() => {
const closeBtn = document.querySelector<HTMLElement>('[data-testid="panel-close"]');
closeBtn?.scrollIntoView({
behavior: prefersReducedMotion ? 'instant' : 'smooth',
block: 'nearest'
});
closeBtn?.focus({ preventScroll: true });
replaceState(page.url.pathname, page.state ?? {});
})
.catch((e) => console.error('task deep-link failed', e));
}
scrollToCommentFromQuery(new URL(page.url), {