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!
TypeScript agent-skillsaidsh-pluginhacktoberfestjavascriptmcp-serverreactresume-builderself-hostedtypescript
fix: keep open application lanes visible on desktop boards (#3847)
Amruth Pillaibaf620b3777b
diff --git a/apps/mobile/scripts/applications-summary.test.mjs b/apps/mobile/scripts/applications-summary.test.mjsindex d773287ec..6d6f4ce2b 100644--- a/apps/mobile/scripts/applications-summary.test.mjs+++ b/apps/mobile/scripts/applications-summary.test.mjs@@ -690,6 +690,11 @@ assert.deepEqual(list.visibleSelection(grouped, new Set(["awaiting-review"]), ne"legacy",]);const board = load("features/applications-board/board.ts");+const tabletLane = board.tabletColumnWidth(1200, 5, 16, 12);+assert.ok(16 + tabletLane * 5 + 12 * 4 <= 1200, "Offer fits after the sidebar on a 1440pt tablet");+assert.equal(board.tabletColumnWidth(2000, 5, 16, 12), 250, "Wide boards retain their preferred column size");+assert.ok(board.tabletColumnWidth(784, 5, 16, 12) >= 208, "Narrow boards scroll instead of squeezing cards");+assert.ok(board.tabletColumnWidth(1200, 8, 16, 12) * 8 > 1200, "Extra custom lanes remain scrollable");const pending = { id: "custom", from: "applied", to: "awaiting-review" };assert.equal(board.keepPending(pending, [{ id: "custom", status: "applied", laneId: "awaiting-review" }]), null);assert.equal(board.keepPending(pending, [{ id: "custom", status: "applied", laneId: "applied" }]), pending);diff --git a/apps/mobile/src/features/applications-board/board-screen.tsx b/apps/mobile/src/features/applications-board/board-screen.tsxindex ba8f5b749..391f620c1 100644--- a/apps/mobile/src/features/applications-board/board-screen.tsx+++ b/apps/mobile/src/features/applications-board/board-screen.tsx@@ -19,7 +19,7 @@ import Animated, {withSpring,} from "react-native-reanimated";import { scheduleOnRN } from "react-native-worklets";-import { keepPending, pendingAfterError, stageAt } from "./board";+import { keepPending, pendingAfterError, stageAt, tabletColumnWidth } from "./board";import { useApplicationSearch } from "./search";import { ApplicationsViewFrame } from "./views";import { useUserTime } from "@/features/application-detail/hooks";@@ -52,9 +52,8 @@ import {} from "@/ui";import { usePullRefresh } from "@/ui/use-pull-refresh";-// Column widths from the mockup (career.html `.column`): phone 268 pt, tablet 250 pt.+// Preferred column widths from the mockup (career.html `.column`); tablet lanes can shrink to fit.const PHONE_COLUMN = 268;-const TABLET_COLUMN = 250;// Cards mounted per column at first; the rest show in batches, as web.const COLUMN_PAGE_SIZE = 50;const LONG_PRESS_MS = 400;@@ -89,6 +88,7 @@ function Board() {const { motion, radius, shadows, space } = useTheme();const { width: windowWidth } = useWindowDimensions();const tablet = useIsTablet();+ const [boardWidth, setBoardWidth] = useState(0);const reduceMotion = useReducedMotion();const query = useApplications();const laneQuery = useApplicationLanes();@@ -135,7 +135,11 @@ function Board() {const byStage = new Map<string, Application[]>(stageIds.map((stage) => [stage, []]));for (const application of applications) byStage.get(statusOf(application))?.push(application);- const columnWidth = tablet ? TABLET_COLUMN : Math.min(PHONE_COLUMN, windowWidth - space.s4 * 2 - space.s8);+ const columnWidth = tablet+ ? boardWidth+ ? tabletColumnWidth(boardWidth, stages.filter((lane) => lane.category !== "closed").length, space.s4, space.s3)+ : 250+ : Math.min(PHONE_COLUMN, windowWidth - space.s4 * 2 - space.s8);const cardWidth = columnWidth - space.s3 * 2;const moveTo = (application: Application, stage: string) => {@@ -334,12 +338,13 @@ function Board() {<Viewref={board}style={{ flex: 1 }}- onLayout={() =>+ onLayout={(event) => {+ setBoardWidth(event.nativeEvent.layout.width);board.current?.measureInWindow((x, y, width) => {boardRect.current = { x, y, width };bounds.set({ x, width });- })- }+ });+ }}><AnimatedScrollViewref={scrollRef}diff --git a/apps/mobile/src/features/applications-board/board.ts b/apps/mobile/src/features/applications-board/board.tsindex 571391c9e..8a6c69be9 100644--- a/apps/mobile/src/features/applications-board/board.ts+++ b/apps/mobile/src/features/applications-board/board.ts@@ -1,4 +1,10 @@-// Board drag and drop state, kept pure so Node runs it in the M5-T3 scenarios.+// Board geometry and drag/drop state.++/** Fit the open lanes after sidebar/padding; retain readable scrolling columns on smaller tablets. */+export function tabletColumnWidth(width: number, openLanes: number, padding: number, gap: number) {+ const count = Math.max(1, openLanes);+ return Math.max(208, Math.min(250, (width - padding * 2 - gap * (count - 1)) / count));+}/** A dropped card shown in its new column until the list's optimistic update lands. */export type PendingMove = { id: string; from: string; to: string };diff --git a/apps/web/src/features/applications/components/board.tsx b/apps/web/src/features/applications/components/board.tsxindex c8986c2b2..dbf64cf9f 100644--- a/apps/web/src/features/applications/components/board.tsx+++ b/apps/web/src/features/applications/components/board.tsx@@ -177,8 +177,8 @@ function Column({ lane, applications, onOpen }: ColumnProps) {<sectionaria-label={label}className={cn(- // Lanes share the width (five fit at desktop sizes) down to 220px; past that the board scrolls.- "flex max-w-[320px] min-w-[220px] flex-1 basis-0 flex-col rounded-xl border bg-sunken transition-colors duration-quick",+ // Five open lanes fit inside the padded desktop page; more lanes or narrower boards scroll.+ "flex max-w-[320px] min-w-52 flex-1 basis-0 flex-col rounded-xl border bg-sunken transition-colors duration-quick",isOver ? "border-accent bg-accent-soft" : "border-transparent",)}>diff --git a/docs/guides/tracking-job-applications.mdx b/docs/guides/tracking-job-applications.mdxindex cd54a406d..b9198b9c4 100644--- a/docs/guides/tracking-job-applications.mdx+++ b/docs/guides/tracking-job-applications.mdx@@ -58,8 +58,10 @@ In the web app, use the tabs above the list to switch views. Your choice is kept<Tab title="Board">One column per stage, with a card for each application. Drag a card to another column to move it to that stage. Each card also has a **⋯** menu with **Move to…**, **Mark as closed…** and **Delete…**, which is handy if you prefer the keyboard. When **Show closed applications** is on, a **Closed** column appears too. Dragging a card there asks why it ended before closing it, so Insights can use the outcome. In the mobile app, the **Closed** column is always the last column on the board.+ At a 1440px desktop browser width, the five standard open stages fit together, including **Offer**. Native tablet lanes also adapt to the available board width. Narrower boards and boards with extra stages keep horizontal scrolling so cards stay readable.+<Frame caption="Board view groups applications by stage">- <img src="/images/guides/tracking-job-applications/applications-board-view.webp" alt="Applications board showing Saved, Applied, Screening and Interview columns with fictional job cards" />+ <img src="/images/guides/tracking-job-applications/default-application-board.png" alt="Applications board with Saved, Applied, Screening, Interview and Offer fully visible, and a fictional Platform Engineer application in Interview" /></Frame><Frame caption="A card's menu, with Move to… open">diff --git a/docs/images/guides/tracking-job-applications/default-application-board.png b/docs/images/guides/tracking-job-applications/default-application-board.pngnew file mode 100644index 000000000..10dce725eBinary files /dev/null and b/docs/images/guides/tracking-job-applications/default-application-board.png differdiff --git a/tests/e2e/specs/application-lanes.spec.ts b/tests/e2e/specs/application-lanes.spec.tsindex 36a97da49..aaa63d267 100644--- a/tests/e2e/specs/application-lanes.spec.ts+++ b/tests/e2e/specs/application-lanes.spec.ts@@ -106,6 +106,13 @@ test("custom stages preserve same-category history, retire safely, and retain aconst id: string = await created.json();const initial = await readApplication(page.request, id);+ await page.setViewportSize({ width: 1440, height: 1000 });+ await page.goto("/dashboard/applications?view=board");+ await expect(page.getByRole("region", { name: "Offer", exact: true })).toBeVisible();+ await page.screenshot({ path: testInfo.outputPath("default-application-board.png"), fullPage: true });+ for (const name of ["Saved", "Applied", "Screening", "Interview", "Offer"])+ await expect(page.getByRole("region", { name, exact: true }).getByRole("heading")).toBeInViewport({ ratio: 1 });+ await page.setViewportSize({ width: 2700, height: 1100 });await page.goto("/dashboard/applications?view=board&closed=true");await page.getByRole("button", { name: "More", exact: true }).click();await page.getByRole("menuitem", { name: "Manage stages…", exact: true }).click();@@ -145,6 +152,16 @@ test("custom stages preserve same-category history, retire safely, and retain aawait page.setViewportSize({ width: 1440, height: 1000 });await takeHomeColumn.scrollIntoViewIfNeeded();await page.screenshot({ path: testInfo.outputPath("custom-application-board.png"), fullPage: true });+ expect(await takeHomeColumn.locator("..").evaluate((element) => element.scrollWidth > element.clientWidth)).toBe(+ true,+ );+ for (const width of [1440, 1024]) {+ await page.setViewportSize({ width, height: 1000 });+ const lastColumn = page.getByRole("region", { name: "Ghosted", exact: true });+ await lastColumn.scrollIntoViewIfNeeded();+ await expect(lastColumn.getByRole("heading")).toBeInViewport({ ratio: 1 });+ expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)).toBe(true);+ }await page.setViewportSize({ width: 2700, height: 1100 });await page.route("**/api/rpc/applications/update", (route) => route.abort("failed"));const refusedMove = page.waitForEvent("requestfailed", {