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

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 was merged in pull request #377.
This commit is contained in:
Marcel
2026-04-29 21:34:41 +02:00
committed by marcel
parent 7dc5dc6f71
commit db66d0cc61

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), {