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 application recovery actions and outcomes clear
Amruth Pillaif017cafcc760
diff --git a/apps/mobile/scripts/experience.test.mjs b/apps/mobile/scripts/experience.test.mjsindex 68ab8618e..94183d63c 100644--- a/apps/mobile/scripts/experience.test.mjs+++ b/apps/mobile/scripts/experience.test.mjs@@ -916,6 +916,7 @@ for (const [overrides, label, destination] of []) {reset();tree = render(NextStepCard, { application: { ...application, ...overrides }, onOpenInterview() {} });+ assert.equal(tree.props.title, overrides.status === "closed" ? "Outcome" : "Next step");control(tree, label).onPress();assert.equal(calls.at(-1), `/applications/job-a/${destination}`);if (!overrides.status) assert.ok(!nodes(tree).some((node) => node.props.label === "Schedule an interview"));diff --git a/apps/mobile/src/features/application-detail/sections.tsx b/apps/mobile/src/features/application-detail/sections.tsxindex 6a063d5f5..6968d3246 100644--- a/apps/mobile/src/features/application-detail/sections.tsx+++ b/apps/mobile/src/features/application-detail/sections.tsx@@ -224,7 +224,7 @@ export function NextStepCard({ application, onOpenInterview }: SectionProps & In};return (- <Section title={t`Next step`}>+ <Section title={step.kind === "closed" ? t`Outcome` : t`Next step`}><Card style={text.tone === "warn" ? { borderColor: colors.warn, backgroundColor: colors.warnSoft } : undefined}><View style={{ gap: space.s3 }}><View style={{ flexDirection: "row", gap: space.s3 }}>diff --git a/apps/web/src/features/applications/components/add-application-dialog.tsx b/apps/web/src/features/applications/components/add-application-dialog.tsxindex a623d4d0c..92d042936 100644--- a/apps/web/src/features/applications/components/add-application-dialog.tsx+++ b/apps/web/src/features/applications/components/add-application-dialog.tsx@@ -650,11 +650,6 @@ function AddApplicationForm({ onClose, onAdded, initialCapture, forPicker }: Add</Trans></p>)}- {parsed?.enrichmentWarning && (- <p className="text-xs text-warn-text" role="status">- <Trans>AI couldn't fill the details. The posting is retained; complete the fields manually.</Trans>- </p>- )}{parsed?.postingSource.fallbackReason && (<p className="text-xs text-warn-text" role="status"><Trans>Enhanced reading was unavailable. The built-in reader retrieved this posting.</Trans>@@ -921,7 +916,7 @@ function AddApplicationForm({ onClose, onAdded, initialCapture, forPicker }: Add))}</NativeSelect></div>- <DialogFooter>+ <DialogFooter className="sticky bottom-0 z-10 bg-raised py-3"><Buttontype="button"variant={forPicker || logsSentResume ? "primary" : "secondary"}@@ -980,11 +975,17 @@ function ReadStatus({ link, readable, pending, error, parsed, ai, guessed = fals</p>);}- if (parsed && (!parsed.role.trim() || !parsed.company.trim())) {+ if (parsed?.enrichmentWarning || (parsed && (!parsed.role.trim() || !parsed.company.trim()))) {return (<p className={cn(base, "text-warn-text")} role="status"><Icon name="warning-circle" size={16} className="shrink-0" />- <Trans>Some job details couldn't be read. Fill in the role and company, or paste one job's posting text.</Trans>+ {parsed.enrichmentWarning ? (+ <Trans>AI couldn't fill the details. The posting is retained; complete the fields manually.</Trans>+ ) : (+ <Trans>+ Some job details couldn't be read. Fill in the role and company, or paste one job's posting text.+ </Trans>+ )}</p>);}diff --git a/apps/web/src/features/applications/components/application-workflows.test.tsx b/apps/web/src/features/applications/components/application-workflows.test.tsxindex 6514cf5f5..372754750 100644--- a/apps/web/src/features/applications/components/application-workflows.test.tsx+++ b/apps/web/src/features/applications/components/application-workflows.test.tsx@@ -367,6 +367,7 @@ it("shows pasted text once when AI couldn't read it, and saves that text (J2-20)});fireEvent.click(screen.getByRole("button", { name: "Read with AI" }));await screen.findByText(/AI couldn't fill the details/);+ expect(screen.queryByText(/Some job details couldn't be read/)).toBeNull();expect(screen.queryByRole("textbox", { name: "Saved description" })).toBeNull();fireEvent.change(screen.getByRole("textbox", { name: "Role" }), { target: { value: "VP of Engineering" } });fireEvent.change(screen.getByRole("textbox", { name: "Company" }), { target: { value: "Fieldnote" } });@@ -398,6 +399,7 @@ it("shows the posting once when a link couldn't be read, its text was pasted andfireEvent.change(await screen.findByRole("textbox", { name: "Pasted description" }), { target: { value: posting } });fireEvent.click(screen.getByRole("button", { name: "Read with AI" }));await screen.findByText(/AI couldn't fill the details/);+ expect(screen.queryByText(/Some job details couldn't be read/)).toBeNull();expect(screen.getAllByRole("textbox").filter((box) => (box as HTMLTextAreaElement).value === posting)).toHaveLength(1,diff --git a/apps/web/src/features/applications/components/detail/next-step-card.test.tsx b/apps/web/src/features/applications/components/detail/next-step-card.test.tsxindex fb8819a7a..636daf300 100644--- a/apps/web/src/features/applications/components/detail/next-step-card.test.tsx+++ b/apps/web/src/features/applications/components/detail/next-step-card.test.tsx@@ -21,6 +21,30 @@ vi.mock("../../use-application-actions", () => ({ useInvalidateApplications: ()const { NextStepCard } = await import("./next-step-card");+it.each(["closed", "applied"] as const)("labels %s applications with the matching heading and actions", (status) => {+ i18n.loadAndActivate({ locale: "en", messages: {} });+ const application = {+ id: "outcome",+ role: "Engineer",+ company: "Example",+ status,+ closedReason: status === "closed" ? "accepted" : null,+ appliedAt: new Date(),+ activity: [],+ followUpAt: null,+ followUpNote: null,+ } as unknown as Application;+ render(+ <I18nProvider i18n={i18n}>+ <QueryClientProvider client={new QueryClient()}>+ <NextStepCard application={application} onScheduleInterview={vi.fn()} />+ </QueryClientProvider>+ </I18nProvider>,+ );+ expect(screen.getByRole("heading", { name: status === "closed" ? "Outcome" : "Next step" })).toBeVisible();+ expect(screen.queryByRole("button", { name: /^Edit$/ }) !== null).toBe(status !== "closed");+});+it("opens the follow-up with its saved date and note, then saves the edited note", async () => {i18n.loadAndActivate({ locale: "en", messages: {} });const application = {diff --git a/apps/web/src/features/applications/components/detail/next-step-card.tsx b/apps/web/src/features/applications/components/detail/next-step-card.tsxindex 98b50eeb9..27f8eb73e 100644--- a/apps/web/src/features/applications/components/detail/next-step-card.tsx+++ b/apps/web/src/features/applications/components/detail/next-step-card.tsx@@ -92,7 +92,7 @@ export function NextStepCard({ application, onScheduleInterview }: NextStepCardPreturn (<section aria-labelledby="application-next-step" className="grid gap-2"><h3 id="application-next-step" className="text-xs font-semibold text-ink-3">- <Trans>Next step</Trans>+ {step.kind === "closed" ? <Trans>Outcome</Trans> : <Trans>Next step</Trans>}</h3><divclassName={cn(diff --git a/docs/guides/adding-an-application.mdx b/docs/guides/adding-an-application.mdxindex d4dbc59e8..3d75c5d2b 100644--- a/docs/guides/adding-an-application.mdx+++ b/docs/guides/adding-an-application.mdx@@ -189,7 +189,14 @@ time appear when available, and do not guarantee the posting is current.When a page publishes structured job data, its own title and company are kept over anything a model suggests, and escaped line breaks in its description are decoded. The employer's exact title is what their application system and emails use. Application forms, their buttons and selectors, and equal-opportunity or veteran boilerplate are left out of the saved description; the role's own text is kept.-AI enrichment is optional. If it fails, the retrieved description is retained so you can complete the fields manually. When you pasted the posting text yourself and AI couldn't read it, the text stays in **Job link or posting text** and is saved from there; no second **Saved description** box appears.+AI enrichment is optional. If it fails, the retrieved description is retained so you can complete the fields manually. When you pasted the posting text yourself and AI couldn't read it, the text stays in **Job link or posting text** and is saved from there; no second **Saved description** box appears. One status explains the failure. In the web dialog, the save actions stay at the bottom while you scroll the fields.++<Frame caption="An unsuccessful optional AI read keeps one warning and the original posting. The web save actions stay visible while the fields scroll.">+ <img+ src="/images/guides/adding-an-application/posting-ai-recovery.png"+ alt="Scrolled web Save a job dialog with the retained fictional posting, one AI failure warning, manually completed Tools Engineer and Fictional Studio fields, and visible Save job and Save and prepare resume buttons"+ />+</Frame><Note>Only public HTTP(S) pages can be read. If a page requires sign-in or can't be retrieved, paste its description indiff --git a/docs/guides/managing-an-application.mdx b/docs/guides/managing-an-application.mdxindex 7014a53a2..7e41f9c08 100644--- a/docs/guides/managing-an-application.mdx+++ b/docs/guides/managing-an-application.mdx@@ -67,7 +67,14 @@ Each move is added to the activity history. **Mark as applied** uses the date yoAt **Offer**, the offer leads instead: **Reply to the offer** by the deadline saved with its terms (amber once it has passed), **Decide on the offer** with **Compare offers** when terms are saved without a deadline, or **Add the offer's terms** when none are saved yet. When no deadline is saved, a follow-up you set comes first. Interviews booked before the offer stay in **Activity** and the calendar.-A **Saved** application shows "Not applied yet", and a closed one shows its reason. Overdue follow-ups and long waits are highlighted in amber.+A **Saved** application shows "Not applied yet". For a closed application, **Outcome** replaces **Next step** and shows its reason, without an **Edit** action. Overdue follow-ups and long waits are highlighted in amber.++<Frame caption="A closed application shows its recorded outcome on web and native. This image shows the web card.">+ <img+ src="/images/guides/managing-an-application/closed-outcome.png"+ alt="Outcome card showing Accepted offer with a check mark and no Edit action"+ />+</Frame>After you contact the employer, choose **Followed up** below **Next step** in application details, on web or in the native app. This records contact now in **Activity** (**Timeline** in the native app) and restarts the ten-day no-reply clock for the current stage. For interviews, silence starts from the later of your contact and the last interview's end. Moving between lanes of the same stage keeps this contact; entering another stage starts a separate wait.diff --git a/docs/images/guides/adding-an-application/posting-ai-recovery.png b/docs/images/guides/adding-an-application/posting-ai-recovery.pngnew file mode 100644index 000000000..415a97a9dBinary files /dev/null and b/docs/images/guides/adding-an-application/posting-ai-recovery.png differdiff --git a/docs/images/guides/managing-an-application/closed-outcome.png b/docs/images/guides/managing-an-application/closed-outcome.pngnew file mode 100644index 000000000..500c72fc4Binary files /dev/null and b/docs/images/guides/managing-an-application/closed-outcome.png differdiff --git a/tests/e2e/specs/application-feedback.spec.ts b/tests/e2e/specs/application-feedback.spec.tsnew file mode 100644index 000000000..8377c0a14--- /dev/null+++ b/tests/e2e/specs/application-feedback.spec.ts@@ -0,0 +1,114 @@+import { startAiStub } from "../fixtures/ai-stub";+import { expect, test } from "../fixtures/test";++test.skip(process.env.FLAG_ALLOW_UNSAFE_AI_BASE_URL !== "true", "Needs local stub URL permission");+let stub: Awaited<ReturnType<typeof startAiStub>>;+test.beforeAll(async () => {+ stub = await startAiStub();+});+test.afterAll(async () => {+ await stub?.close();+});++for (const width of [390, 1440]) {+ test(`failed posting read keeps one warning, reachable actions and the full posting at ${width}px`, async ({+ authPage: page,+ }, info) => {+ const created = await page.request.post("/api/openapi/ai-providers", {+ data: {+ label: "Fictional local reader",+ provider: "openai-compatible",+ model: "stub",+ baseURL: stub.baseURL,+ apiKey: "stub-key",+ },+ });+ expect(created.ok()).toBe(true);+ const provider = await created.json();+ expect((await page.request.post(`/api/openapi/ai-providers/${provider.id}/test`)).ok()).toBe(true);+ await page.setViewportSize({ width, height: 900 });+ await page.emulateMedia({ reducedMotion: "reduce" });+ await page.goto("/dashboard/applications");+ await page.getByRole("button", { name: "Save job", exact: true }).first().click();+ const dialog = page.getByRole("dialog", { name: "Save a job", exact: true });+ const posting =+ "Fictional responsibilities without structured employer details.\n" ++ "Build accessible tools and keep customer information private. ".repeat(15);+ await dialog.getByLabel("Job link or posting text").fill(posting);+ const before = stub.requests.length;+ await dialog.getByRole("button", { name: "Read with AI", exact: true }).click();+ await page.getByRole("alertdialog").getByRole("button", { name: "Don't share", exact: true }).click();+ expect(stub.requests).toHaveLength(before);+ await expect(dialog.getByLabel("Job link or posting text")).toHaveValue(posting);+ await dialog.getByRole("button", { name: "Read with AI", exact: true }).click();+ await page.getByRole("alertdialog").getByRole("button", { name: "Allow this operation", exact: true }).click();+ // The real provider transport returns "1", which cannot supply structured posting details.+ await expect(+ dialog.getByText("AI couldn't fill the details. The posting is retained; complete the fields manually.", {+ exact: true,+ }),+ ).toBeVisible();+ await expect(dialog.getByText(/Some job details couldn't be read/)).toHaveCount(0);+ await expect(dialog.locator("textarea")).toHaveCount(1);+ await expect(dialog.getByLabel("Job link or posting text")).toHaveValue(posting);+ expect(stub.requests).toHaveLength(before + 1);+ await dialog.getByLabel("Role", { exact: true }).fill("Tools Engineer");+ await dialog.getByLabel("Company", { exact: true }).fill("Fictional Studio");+ const save = dialog.getByRole("button", { name: "Save job", exact: true });+ for (const fontSize of [16, 24]) {+ await page.evaluate((value) => {+ document.documentElement.style.fontSize = `${value}px`;+ }, fontSize);+ for (const end of [false, true]) {+ await dialog.evaluate((element, bottom) => {+ element.scrollTop = bottom ? element.scrollHeight : 0;+ }, end);+ const action = await save.boundingBox();+ const frame = await dialog.boundingBox();+ if (!action || !frame) throw new Error("Save action or dialog missing");+ expect(action.y).toBeGreaterThanOrEqual(frame.y);+ expect(action.y + action.height).toBeLessThanOrEqual(frame.y + frame.height + 1);+ expect(+ await save.evaluate((element) => {+ const box = element.getBoundingClientRect();+ return element.contains(document.elementFromPoint(box.x + box.width / 2, box.y + box.height / 2));+ }),+ ).toBe(true);+ }+ }+ await page.evaluate(() => {+ document.documentElement.style.fontSize = "16px";+ });+ await dialog.screenshot({ path: info.outputPath("posting-recovery.png"), animations: "disabled" });+ await save.click();+ await expect(dialog).toBeHidden();+ const jobs = await (await page.request.get("/api/openapi/applications")).json();+ expect(jobs).toHaveLength(1);+ expect(jobs[0]).toMatchObject({+ company: "Fictional Studio",+ role: "Tools Engineer",+ jobDescription: posting.trim(),+ });+ await page.reload();+ expect((await (await page.request.get(`/api/openapi/applications/${jobs[0].id}`)).json()).jobDescription).toBe(+ posting.trim(),+ );+ });+}++test("closed application shows Outcome with its reason and no preparation or Edit action", async ({+ authPage: page,+}, info) => {+ const created = await page.request.post("/api/openapi/applications", {+ data: { company: "Fictional Studio", role: "Tools Engineer", status: "closed", closedReason: "accepted" },+ });+ expect(created.ok()).toBe(true);+ await page.goto("/dashboard/applications?closed=true");+ await page.getByText("Tools Engineer", { exact: true }).first().click();+ const card = page.locator("section[aria-labelledby='application-next-step']");+ await expect(card.getByRole("heading", { name: "Outcome", exact: true })).toBeVisible();+ await expect(card).toContainText("Accepted offer");+ await expect(card.getByRole("button", { name: "Edit", exact: true })).toHaveCount(0);+ await expect(page.getByRole("button", { name: "Prepare a resume", exact: true })).toHaveCount(0);+ await card.screenshot({ path: info.outputPath("closed-outcome.png"), animations: "disabled" });+});