Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): fix task table links in Safari#20663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 4 commits intomainfrommafredri/fix-site-task-table-link
Nov 4, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletionssite/src/pages/TasksPage/TasksTable.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,12 @@ import {
TooltipProvider,
TooltipTrigger,
} from "components/Tooltip/Tooltip";
import { useClickableTableRow } from "hooks";
import { RotateCcwIcon, TrashIcon } from "lucide-react";
import { TaskDeleteDialog } from "modules/tasks/TaskDeleteDialog/TaskDeleteDialog";
import { TaskStatus } from "modules/tasks/TaskStatus/TaskStatus";
import { type FC, type ReactNode, useState } from "react";
import {Link as RouterLink } from "react-router";
import {useNavigate } from "react-router";
import { relativeTime } from "utils/time";

type TasksTableProps = {
Expand DownExpand Up@@ -116,24 +117,27 @@ type TaskRowProps = { task: Task };
const TaskRow: FC<TaskRowProps> = ({ task }) => {
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);
const templateDisplayName = task.template_display_name ?? task.template_name;
const navigate = useNavigate();

const taskPageLink = `/tasks/${task.owner_name}/${task.id}`;
// Discard role, breaks Chromatic.
const { role, ...clickableRowProps } = useClickableTableRow({
onClick: () => navigate(taskPageLink),
});

return (
<>
<TableRow className="relative" hover>
<TableRow
key={task.id}
data-testid={`task-${task.id}`}
{...clickableRowProps}
>
<TableCell>
<AvatarData
title={
<>
<span className="block max-w-[520px] overflow-hidden text-ellipsis whitespace-nowrap">
{task.initial_prompt}
</span>
<RouterLink
to={`/tasks/${task.owner_name}/${task.id}`}
className="absolute inset-0"
>
<span className="sr-only">Access task</span>
</RouterLink>
</>
<span className="block max-w-[520px] overflow-hidden text-ellipsis whitespace-nowrap">
{task.initial_prompt}
</span>
}
subtitle={templateDisplayName}
avatar={
Expand DownExpand Up@@ -171,8 +175,10 @@ const TaskRow: FC<TaskRowProps> = ({ task }) => {
<Button
size="icon"
variant="outline"
className="relative z-50"
onClick={() => setIsDeleteDialogOpen(true)}
onClick={(e) => {
e.stopPropagation();
setIsDeleteDialogOpen(true);
}}
>
<span className="sr-only">Delete task</span>
<TrashIcon />
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp