deer-flow/frontend/src/components/workspace/thread-scheduled-tasks-link.tsx
Ryker_Feng 7a985f441c
Fix(frontend): Fix mobile workspace and accessibility blockers (#3740)
* fix(frontend): address mobile workspace polish blockers

* fix(frontend): prevent mobile landing overflow

* fix(frontend): keep landing sections within mobile viewport

Section titles used a fixed text-5xl with no word breaking, and the
<section> flex items had default min-width:auto, so wider Linux font
metrics in CI pushed content past the viewport (scrollWidth 345 > 320).
Make titles/subtitles responsive with break-words, constrain section
width with min-w-0, and add an overflow-x-clip guard on the page root.

* fix(frontend): address review feedback on mobile landing PR

- add hamburger Sheet nav below sm: so mobile users keep docs/blog access
- switch useIsMobile to useSyncExternalStore to avoid hydration swap flash
- memoize artifactContent so it isn't rebuilt on every streamed token
- use slot-based key in HeroWordRotate; drop flex-wrap so SuperAgent never orphans at 320px
- delete unused word-rotate.tsx dead code
- move section gutter to <main> for a uniform mobile padding contract
- harden e2e: per-viewport overflow tests, locale-stable artifact selector, focus-ring asserts light vs dark differ

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-07-06 07:15:35 +08:00

21 lines
628 B
TypeScript

import { CalendarClock } from "lucide-react";
import Link from "next/link";
import { Button } from "@/components/ui/button";
import { useI18n } from "@/core/i18n/hooks";
export function ThreadScheduledTasksLink({ threadId }: { threadId: string }) {
const { t } = useI18n();
return (
<Button variant="outline" size="sm" asChild>
<Link
aria-label={t.sidebar.scheduledTasks}
href={`/workspace/scheduled-tasks?thread_id=${encodeURIComponent(threadId)}`}
>
<CalendarClock />
<span className="hidden sm:inline">{t.sidebar.scheduledTasks}</span>
</Link>
</Button>
);
}