Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

feat(companies): link company details from the Library table and job header; add the companies help page

Khuram Niaz81ea46195eee
diff --git a/__tests__/CompaniesContainer.spec.tsx b/__tests__/CompaniesContainer.spec.tsx
index 449e0e9..015c295 100644
--- a/__tests__/CompaniesContainer.spec.tsx
+++ b/__tests__/CompaniesContainer.spec.tsx
@@ -33,6 +33,16 @@ vi.mock("@/actions/atsCompany.actions", () => ({
resolveAtsBoard: vi.fn(),
}));
+// A real next/link builds its own IntersectionObserver for prefetching, which
+// would replace the sentinel callback captured below
+vi.mock("next/link", () => ({
+ default: ({ href, children, prefetch: _prefetch, ...rest }: any) => (
+ <a href={href} {...rest}>
+ {children}
+ </a>
+ ),
+}));
+
let intersectionCallback: IntersectionObserverCallback | undefined;
global.IntersectionObserver = class IntersectionObserver {
constructor(callback: IntersectionObserverCallback) {
@@ -50,8 +60,6 @@ describe("CompaniesContainer Search Functionality", () => {
label: "Amazon",
value: "amazon",
createdBy: "user-1",
- // Job tallies are left out on purpose: a non-zero one renders next/link,
- // whose own IntersectionObserver would shadow the sentinel's here.
_count: { contacts: 3 },
},
{ id: "2", label: "Google", value: "google", createdBy: "user-1" },
@@ -433,4 +441,39 @@ describe("CompaniesContainer Search Functionality", () => {
expect(within(row).getByText("3")).toBeInTheDocument();
});
});
+ describe("Details links", () => {
+ it("links each company name to its details page", async () => {
+ (getCompanyList as any).mockResolvedValue({ data: mockCompanies, total: 2 });
+
+ render(<CompaniesContainer />);
+
+ expect(
+ await screen.findByRole("link", { name: "Amazon" }),
+ ).toHaveAttribute("href", "/dashboard/admin/companies/1");
+ });
+
+ it("carries the watchlist scope into the details link", async () => {
+ mockParams = new URLSearchParams("scope=watchlist");
+ (getCompanyList as any).mockResolvedValue({ data: mockCompanies, total: 2 });
+
+ render(<CompaniesContainer />);
+
+ expect(
+ await screen.findByRole("link", { name: "Amazon" }),
+ ).toHaveAttribute("href", "/dashboard/admin/companies/1?scope=watchlist");
+ });
+
+ it("offers View details first in the row menu", async () => {
+ (getCompanyList as any).mockResolvedValue({ data: mockCompanies, total: 2 });
+
+ render(<CompaniesContainer />);
+
+ const row = await screen.findByRole("row", { name: /Amazon/ });
+ await user.click(within(row).getByRole("button", { name: /toggle menu/i }));
+
+ const items = await screen.findAllByRole("menuitem");
+ expect(items[0]).toHaveTextContent("View details");
+ expect(items[0]).toHaveAttribute("href", "/dashboard/admin/companies/1");
+ });
+ });
});
diff --git a/__tests__/JobDetails.spec.tsx b/__tests__/JobDetails.spec.tsx
index 2768937..f2e6677 100644
--- a/__tests__/JobDetails.spec.tsx
+++ b/__tests__/JobDetails.spec.tsx
@@ -498,3 +498,28 @@ describe("JobDetails – auto-match from the jobs list", () => {
expect(chat.sendMessage).not.toHaveBeenCalled();
});
});
+
+describe("JobDetails – company link", () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ chat.approvalPending = false;
+ searchParams = new URLSearchParams();
+ });
+
+ it("links the company in the header to its details page", () => {
+ render(<JobDetails {...baseProps} job={makeJob()} />);
+
+ expect(screen.getByRole("link", { name: "Acme Corp" })).toHaveAttribute(
+ "href",
+ "/dashboard/admin/companies/c1",
+ );
+ });
+
+ it("keeps the dot-separated subtitle reading the same", () => {
+ render(<JobDetails {...baseProps} job={makeJob()} />);
+
+ expect(
+ screen.getByRole("link", { name: "Acme Corp" }).parentElement,
+ ).toHaveTextContent("Acme Corp · Remote · Full-time");
+ });
+});
diff --git a/src/components/admin/CompaniesTable.tsx b/src/components/admin/CompaniesTable.tsx
index 6a865de..a3a393e 100644
--- a/src/components/admin/CompaniesTable.tsx
+++ b/src/components/admin/CompaniesTable.tsx
@@ -18,6 +18,7 @@ import {
import { Company } from "@/models/job.model";
import {
Briefcase,
+ Building2,
Eye,
EyeOff,
MoreVertical,
@@ -71,6 +72,9 @@ function CompaniesTable({
}
};
+ const detailsHref = (id: string) =>
+ `/dashboard/admin/companies/${id}${scope === "watchlist" ? "?scope=watchlist" : ""}`;
+
const toggleWatch = async (company: Company) => {
const next = !company.watched;
const res = await setCompanyWatched(company.id, next);
@@ -146,7 +150,12 @@ function CompaniesTable({
</TableCell>
<TableCell className="font-medium">
<span className="flex items-center gap-1.5">
- {company.label}
+ <Link
+ href={detailsHref(company.id)}
+ className="hover:underline underline-offset-4"
+ >
+ {company.label}
+ </Link>
{company.watched && (
<span
title="On your watchlist"
@@ -223,6 +232,12 @@ function CompaniesTable({
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuLabel>Actions</DropdownMenuLabel>
+ <DropdownMenuItem className="cursor-pointer" asChild>
+ <Link href={detailsHref(company.id)}>
+ <Building2 className="mr-2 h-4 w-4" />
+ View details
+ </Link>
+ </DropdownMenuItem>
{company._count?.jobsApplied ? (
<DropdownMenuItem className="cursor-pointer" asChild>
<Link
diff --git a/src/components/myjobs/job-details/JobDetailsHeader.tsx b/src/components/myjobs/job-details/JobDetailsHeader.tsx
index ed5e3eb..e530e39 100644
--- a/src/components/myjobs/job-details/JobDetailsHeader.tsx
+++ b/src/components/myjobs/job-details/JobDetailsHeader.tsx
@@ -11,6 +11,7 @@ import {
Trash,
Trash2,
} from "lucide-react";
+import Link from "next/link";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
@@ -63,8 +64,7 @@ export function JobDetailsHeader({
onAddNote,
onChangeStatus,
}: JobDetailsHeaderProps) {
- const subtitle = [
- job.Company?.label,
+ const details = [
job.Location?.label,
getJobTypeLabel(job.jobType),
job.workplaceType ? getWorkplaceTypeLabel(job.workplaceType) : null,
@@ -84,7 +84,18 @@ export function JobDetailsHeader({
/>
<div className="flex-1 min-w-0">
<h1 className="text-2xl font-bold">{job.JobTitle?.label}</h1>
- <p className="text-muted-foreground">{subtitle}</p>
+ <p className="text-muted-foreground">
+ {job.Company?.label && (
+ <Link
+ href={`/dashboard/admin/companies/${job.Company.id}`}
+ className="hover:text-foreground hover:underline underline-offset-4"
+ >
+ {job.Company.label}
+ </Link>
+ )}
+ {job.Company?.label && details && " · "}
+ {details}
+ </p>
</div>
</div>
<div className="flex flex-wrap justify-end gap-2">
diff --git a/src/lib/wiki/schema.ts b/src/lib/wiki/schema.ts
index f40d9c2..f567769 100644
--- a/src/lib/wiki/schema.ts
+++ b/src/lib/wiki/schema.ts
@@ -14,6 +14,7 @@ export const WIKI_FEATURES = [
"setup",
"jobs",
"contacts",
+ "companies",
"automations",
"profile",
"ai",
diff --git a/wiki/companies.md b/wiki/companies.md
new file mode 100644
index 0000000..c88c18e
--- /dev/null
+++ b/wiki/companies.md
@@ -0,0 +1,44 @@
+---
+type: how-to
+title: Companies
+description: A company's details page — its jobs, the people you know there, its job board and watch state — and how to get there, watch it, add a contact at it or delete it.
+feature: companies
+tags: [companies, company, company details, company page, watchlist, watch, unwatch, job board, careers page, website, industry, company contacts, delete company]
+aliases: [company page, employer, employers, company profile]
+status: stable
+stale_after: 2027-09-13
+---
+
+# Companies
+
+## What is on a company's details page?
+
+Three parts, top to bottom. A **header row** with the company's logo and name, a line with its industry and website, and the actions: **Watch** (or **Unwatch**), **Edit**, **Delete** and a **⋮** menu linking to the company's website, careers page and job board. Each link appears only when the company has one, and the menu is hidden when it has none.
+
+Below it a **summary card** of eight facts: Watchlist, Board, Industry, Website, Careers page, Jobs, Applied and Contacts. Jobs and Applied count the jobs listed on the page, which leaves out jobs you dismissed from an automation — so Jobs can be lower than **Total Jobs** in **Library → Companies**, which counts them. Contacts counts everyone on the Contacts tab once, even someone who both works there and worked with you there — so it can be higher than the Contacts column in **Library → Companies**, which counts only the people who work there now.
+
+Below that, two **tabs**. **Jobs** lists your jobs at the company, newest first, with status, location, applied date, AI match score and source; click a title to open the job. Jobs you dismissed from an automation are left out, the same as on the Jobs page. **Contacts** splits the people into **Works here** and **Worked with you here**, and a person who is both appears in both. Each tab carries a count badge once it has anything, and the tab you are on is kept in the address bar.
+
+## How do I get to a company's page?
+
+From **Library → Companies**, click the company's name, or open its **⋮** menu and choose **View details**. This works in both the My Companies and Watchlist scopes, and **Back** on the company page returns you to the scope you came from.
+
+From a job, click the company name in the line under the job title on the job's details page.
+
+## How do I watch or unwatch a company?
+
+Click **Watch** in the company page's header. It becomes **Unwatch** once the company is on your watchlist, and the Watchlist fact in the summary card shows how long ago you started watching. Unwatching only takes the company off the watchlist — it stays in your Library with its jobs and contacts. The same toggle is in the company's **⋮** menu in **Library → Companies**.
+
+A watched company with a job board shows up in the **Watched** group when you pick companies for an [automation](./automations.md).
+
+## How do I add a contact at a company?
+
+Open the company's **Contacts** tab and click **Add Contact**. The contact dialog opens with this company already filled in as where they work, so a name is all you need. To edit or delete someone, use the **⋮** menu on their row; the arrow at the start of the row expands their email, phone, notes and linked jobs.
+
+For a former colleague who works somewhere else now, change Company to their current employer, set Role to **Reference** and pick this company under **Worked together at**. They then appear under **Worked with you here**. More in [Contacts](./contacts.md).
+
+## Why can't I delete a company?
+
+Because something still points at it. A company cannot be deleted while it has jobs, while an entry in one of your resumes' experience sections uses it, or while a contact works there or worked with you there. Jobs include ones you dismissed from an automation, which the Jobs page only shows when you pick its **Dismissed (discovered)** filter.
+
+Jobs are checked before you confirm: **Delete** opens an explanation instead of a confirmation, with the number of jobs. Resume entries and contacts are checked when you confirm, and the message says what is in the way. The contact case is covered in [Contacts](./contacts.md#why-cant-i-delete-a-company-or-location). Remove or reassign whatever is blocking, then delete the company.
diff --git a/wiki/index.md b/wiki/index.md
index 52d9bb2..0327903 100644
--- a/wiki/index.md
+++ b/wiki/index.md
@@ -9,6 +9,7 @@ JobSync tracks job applications, resumes and the work you do around them. These
- [Getting Started](./getting-started.md) — create an account, connect an AI provider, add your first job, and what each area of the app is for.
- [Jobs](./jobs.md) — add jobs manually or by pasting a posting into AI chat, move them through the status workflow, edit, filter, export and delete them.
- [Contacts](./contacts.md) — track recruiters, interviewers and references, link them to the jobs they touched, and record how you know them.
+- [Companies](./companies.md) — a company's details page with its jobs and contacts, watching a company, and why a company can't be deleted.
- [Automations](./automations.md) — set up a scheduled search over Greenhouse, Lever and Ashby company boards, fill in the filters that make it work, and handle the jobs it discovers.
- [MCP Access](./mcp.md) — connect an external AI agent such as Claude Desktop, generate and revoke access tokens, and what the agent can do once connected.
diff --git a/wiki/jobs.md b/wiki/jobs.md
index 8f57b19..8c7faa8 100644
--- a/wiki/jobs.md
+++ b/wiki/jobs.md
@@ -37,7 +37,7 @@ The Add Job dialog also has a Status field, so a status can be set when you firs
## What is on a job's details page?
-Three parts, top to bottom. A **header row** with the job title, a `Company · Location · Job Type · Workplace` line, and the actions: Match with AI, Cover Letter, Edit, Delete and a **⋮** menu. Below it a **summary card** of eight facts — Status, Job Type, Salary Range, Source, Applied, AI Match, Resume and Added — with the job URL and any skill badges on a divider row underneath. Below that, five **tabs**.
+Three parts, top to bottom. A **header row** with the job title, a `Company · Location · Job Type · Workplace` line whose company name opens the company's [details page](./companies.md), and the actions: Match with AI, Cover Letter, Edit, Delete and a **⋮** menu. Below it a **summary card** of eight facts — Status, Job Type, Salary Range, Source, Applied, AI Match, Resume and Added — with the job URL and any skill badges on a divider row underneath. Below that, five **tabs**.
The tabs are **Description**, **AI Match**, **Cover Letter**, **Notes** and **[Contacts](./contacts.md)**, and all five are always there. AI Match and Cover Letter stay in the bar even when the job has neither, showing a short explanation and a button to run it — so the tab set never shifts between jobs. Notes and Contacts each carry a count badge once the job has any. Contacts lists the people linked to this job with the role each played. The tab you are on is kept in the address bar, so a refresh, a bookmark or the browser Back button lands you back on the same one.