Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix(applications): keep roles readable beside long follow-up notes (#3648)

Santhi Prakash0bfb2a264dea
diff --git a/apps/web/src/features/applications/components/list-view.test.tsx b/apps/web/src/features/applications/components/list-view.test.tsx
new file mode 100644
index 000000000..dea2bd172
--- /dev/null
+++ b/apps/web/src/features/applications/components/list-view.test.tsx
@@ -0,0 +1,97 @@
+import type { Application } from "../types";
+// @vitest-environment happy-dom
+import { render, screen } from "@testing-library/react";
+import { expect, it, vi } from "vite-plus/test";
+import { i18n } from "@lingui/core";
+import { I18nProvider } from "@lingui/react";
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { ApplicationList } from "./list-view";
+
+const mocks = vi.hoisted(() => ({ breakpoint: "desktop", invalidate: vi.fn() }));
+vi.mock("@/libs/orpc/client", () => ({
+ orpc: {
+ applications: {
+ bulkUpdate: { mutationOptions: () => ({ mutationFn: vi.fn() }) },
+ bulkDelete: { mutationOptions: () => ({ mutationFn: vi.fn() }) },
+ },
+ },
+}));
+vi.mock("../use-application-actions", () => ({ useInvalidateApplications: () => mocks.invalidate }));
+vi.mock("@reactive-resume/ui/hooks/use-breakpoint", () => ({ useBreakpoint: () => mocks.breakpoint }));
+
+const LONG_NOTE =
+ "Call Priya back about the take-home timeline, then email a summary of the referral conversation " +
+ "and the salary band she mentioned on Tuesday";
+
+const application = (over: Partial<Application> = {}): Application =>
+ ({
+ id: "app-1",
+ status: "applied",
+ role: "Senior Frontend Engineer",
+ company: "Globex",
+ location: "San Francisco",
+ appliedAt: new Date("2026-10-01T00:00:00.000Z"),
+ updatedAt: new Date("2026-10-19T00:00:00.000Z"),
+ activity: [],
+ followUpAt: null,
+ followUpNote: null,
+ resumeId: null,
+ coverLetterId: null,
+ closedReason: null,
+ tags: [],
+ ...over,
+ }) as Application;
+
+function renderList(applications: Application[], breakpoint = "desktop") {
+ mocks.breakpoint = breakpoint;
+ i18n.load("en", {});
+ i18n.activate("en");
+ return render(
+ <QueryClientProvider client={new QueryClient()}>
+ <I18nProvider i18n={i18n}>
+ <ApplicationList applications={applications} showClosed selectedId={null} onOpen={() => {}} />
+ </I18nProvider>
+ </QueryClientProvider>,
+ );
+}
+
+const headers = (container: HTMLElement) => Array.from(container.querySelectorAll("thead th"));
+const header = (container: HTMLElement, label: string) =>
+ headers(container).find((th) => th.textContent === label) as HTMLElement;
+
+it("fixes the table layout so a long follow-up note cannot starve Role", () => {
+ const { container } = renderList([
+ application({ followUpAt: new Date("2026-10-25T00:00:00.000Z"), followUpNote: LONG_NOTE }),
+ ]);
+
+ expect(container.querySelector("table")?.className).toContain("table-fixed");
+ expect(header(container, "Next step").className).toContain("w-1/4");
+ expect(header(container, "Role").className).not.toMatch(/\bw-[\d/]/);
+
+ // The note keeps its ellipsis affordance inside a flex item allowed to shrink.
+ const note = screen.getByText(LONG_NOTE);
+ expect(note.className).toContain("truncate");
+ expect(note.className).toContain("min-w-0");
+});
+
+it.each([
+ ["mobile", 1],
+ ["tablet", 4],
+ ["desktop", 5],
+ ["wide", 6],
+] as const)("spans only visible columns at the %s breakpoint", (breakpoint, columns) => {
+ const { container } = renderList([application()], breakpoint);
+ // Extra spanned columns steal Role's remaining width under fixed table layout.
+ expect(container.querySelector("th[scope=colgroup]")?.getAttribute("colspan")).toBe(String(columns));
+});
+
+it("keeps automatic layout and single-cell rows on phones", () => {
+ const { container } = renderList(
+ [application({ followUpAt: new Date("2026-10-25T00:00:00.000Z"), followUpNote: LONG_NOTE })],
+ "mobile",
+ );
+
+ expect(container.querySelector("table")?.className).not.toContain("table-fixed");
+ expect(container.querySelector("thead")).toBeNull();
+ expect(screen.getByText(`Globex · ${LONG_NOTE}`)).toBeTruthy();
+});
diff --git a/apps/web/src/features/applications/components/list-view.tsx b/apps/web/src/features/applications/components/list-view.tsx
index f28de060b..f952e1453 100644
--- a/apps/web/src/features/applications/components/list-view.tsx
+++ b/apps/web/src/features/applications/components/list-view.tsx
@@ -55,7 +55,8 @@ type ListViewProps = {
* for bulk moves, tags, closing and deleting. Phones get two-line rows.
*/
export function ApplicationList({ applications, showClosed, selectedId, onOpen }: ListViewProps) {
- const phone = useBreakpoint() === "mobile";
+ const breakpoint = useBreakpoint();
+ const phone = breakpoint === "mobile";
const [collapsed, setCollapsed] = useState<ReadonlySet<ApplicationStatus>>(new Set());
const [sort, setSort] = useState<Sort>({ key: "updated", direction: "desc" });
const [checked, setChecked] = useState<ReadonlySet<string>>(new Set());
@@ -125,7 +126,7 @@ export function ApplicationList({ applications, showClosed, selectedId, onOpen }
return (
<div className="grid min-w-0 content-start gap-3">
- <table className="w-full border-collapse text-sm">
+ <table className={cn("w-full border-collapse text-sm", !phone && "table-fixed")}>
{!phone && (
<thead>
<tr className="border-b border-line text-xs text-ink-3">
@@ -135,14 +136,14 @@ export function ApplicationList({ applications, showClosed, selectedId, onOpen }
</span>
</th>
{header("role", t`Role`)}
- {header("next", t`Next step`)}
- <th scope="col" className="px-2 text-start font-medium max-lg:hidden">
+ {header("next", t`Next step`, "w-1/4")}
+ <th scope="col" className="w-32 px-2 text-start font-medium max-xl:hidden">
<Trans>Stage</Trans>
</th>
- <th scope="col" className="px-2 text-start font-medium">
+ <th scope="col" className="w-20 px-2 text-start font-medium">
<Trans>Sent</Trans>
</th>
- {header("updated", t`Updated`, "max-md:hidden")}
+ {header("updated", t`Updated`, "w-28 max-lg:hidden")}
</tr>
</thead>
)}
@@ -153,7 +154,11 @@ export function ApplicationList({ applications, showClosed, selectedId, onOpen }
return (
<tbody key={status} aria-labelledby={groupId}>
<tr>
- <th scope="colgroup" colSpan={6} className="pt-3 text-start">
+ <th
+ scope="colgroup"
+ colSpan={phone ? 1 : breakpoint === "wide" ? 6 : breakpoint === "desktop" ? 5 : 4}
+ className="pt-3 text-start"
+ >
<button
type="button"
id={groupId}
@@ -284,10 +289,10 @@ function ApplicationRow({ application, phone, selected, checked, onCheck, onOpen
<td className="px-2">
<span className={cn("flex items-center gap-1.5", tone)}>
<Icon name={next.icon} size={16} className="shrink-0" />
- <span className="truncate">{next.title}</span>
+ <span className="min-w-0 truncate">{next.title}</span>
</span>
</td>
- <td className="px-2 max-lg:hidden">
+ <td className="px-2 max-xl:hidden">
<span className="flex items-center gap-1.5 text-ink-2">
<span
aria-hidden="true"
@@ -309,7 +314,7 @@ function ApplicationRow({ application, phone, selected, checked, onCheck, onOpen
</span>
)}
</td>
- <td className="px-2 text-xs whitespace-nowrap text-ink-3 max-md:hidden">
+ <td className="px-2 text-xs whitespace-nowrap text-ink-3 max-lg:hidden">
{formatRelativeTime(application.updatedAt, i18n.locale)}
</td>
</tr>