Merge pull request #62 from DaKheera47/app-crash-when-asking-for-base-id-in-onboarding
App crash when asking for base id in onboarding
This commit is contained in:
commit
33ab3595ae
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@ -2,9 +2,9 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{ github.workflow }}-${{ github.ref }}
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||||
@ -32,7 +32,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
cache-dependency-path: orchestrator/package-lock.json
|
cache-dependency-path: orchestrator/package-lock.json
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@ -53,15 +53,23 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
cache-dependency-path: ${{ matrix.project }}/package-lock.json
|
cache-dependency-path: ${{ matrix.project }}/package-lock.json
|
||||||
|
|
||||||
- name: Build ${{ matrix.project }}
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.project }}" == extractors/* ]]; then
|
if [[ "${{ matrix.project }}" == extractors/* ]]; then
|
||||||
npm ci --ignore-scripts
|
npm ci --ignore-scripts
|
||||||
else
|
else
|
||||||
npm ci
|
npm ci
|
||||||
fi
|
fi
|
||||||
npm run build
|
working-directory: ${{ matrix.project }}
|
||||||
|
|
||||||
|
- name: Type Check (orchestrator only)
|
||||||
|
if: matrix.project == 'orchestrator'
|
||||||
|
run: npm run check:types
|
||||||
|
working-directory: ${{ matrix.project }}
|
||||||
|
|
||||||
|
- name: Build ${{ matrix.project }}
|
||||||
|
run: npm run build
|
||||||
working-directory: ${{ matrix.project }}
|
working-directory: ${{ matrix.project }}
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
"ci": "biome ci",
|
"ci": "biome ci",
|
||||||
"check": "biome check",
|
"check": "biome check",
|
||||||
"check:fix": "biome check --write",
|
"check:fix": "biome check --write",
|
||||||
|
"check:types": "tsc --noEmit",
|
||||||
"format": "biome format",
|
"format": "biome format",
|
||||||
"format:fix": "biome format --write",
|
"format:fix": "biome format --write",
|
||||||
"build": "npm run build:client && npm run build:server",
|
"build": "npm run build:client && npm run build:server",
|
||||||
|
|||||||
@ -348,7 +348,6 @@ export const OrchestratorPage: React.FC = () => {
|
|||||||
selectedJob={selectedJob}
|
selectedJob={selectedJob}
|
||||||
onSelectJobId={handleSelectJobId}
|
onSelectJobId={handleSelectJobId}
|
||||||
onJobUpdated={loadJobs}
|
onJobUpdated={loadJobs}
|
||||||
onSetActiveTab={setActiveTab}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -382,7 +381,6 @@ export const OrchestratorPage: React.FC = () => {
|
|||||||
selectedJob={selectedJob}
|
selectedJob={selectedJob}
|
||||||
onSelectJobId={handleSelectJobId}
|
onSelectJobId={handleSelectJobId}
|
||||||
onJobUpdated={loadJobs}
|
onJobUpdated={loadJobs}
|
||||||
onSetActiveTab={setActiveTab}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</DrawerContent>
|
</DrawerContent>
|
||||||
|
|||||||
@ -109,6 +109,7 @@ const baseSettings: AppSettings = {
|
|||||||
ukvisajobsPasswordHint: null,
|
ukvisajobsPasswordHint: null,
|
||||||
webhookSecretHint: null,
|
webhookSecretHint: null,
|
||||||
basicAuthActive: false,
|
basicAuthActive: false,
|
||||||
|
rxresumeBaseResumeId: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderPage = () => {
|
const renderPage = () => {
|
||||||
|
|||||||
@ -163,7 +163,6 @@ describe("JobDetailPanel", () => {
|
|||||||
selectedJob={job}
|
selectedJob={job}
|
||||||
onSelectJobId={vi.fn()}
|
onSelectJobId={vi.fn()}
|
||||||
onJobUpdated={vi.fn().mockResolvedValue(undefined)}
|
onJobUpdated={vi.fn().mockResolvedValue(undefined)}
|
||||||
onSetActiveTab={vi.fn()}
|
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -178,7 +177,6 @@ describe("JobDetailPanel", () => {
|
|||||||
selectedJob={null}
|
selectedJob={null}
|
||||||
onSelectJobId={vi.fn()}
|
onSelectJobId={vi.fn()}
|
||||||
onJobUpdated={vi.fn().mockResolvedValue(undefined)}
|
onJobUpdated={vi.fn().mockResolvedValue(undefined)}
|
||||||
onSetActiveTab={vi.fn()}
|
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -195,7 +193,6 @@ describe("JobDetailPanel", () => {
|
|||||||
})}
|
})}
|
||||||
onSelectJobId={vi.fn()}
|
onSelectJobId={vi.fn()}
|
||||||
onJobUpdated={vi.fn().mockResolvedValue(undefined)}
|
onJobUpdated={vi.fn().mockResolvedValue(undefined)}
|
||||||
onSetActiveTab={vi.fn()}
|
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -213,7 +210,6 @@ describe("JobDetailPanel", () => {
|
|||||||
selectedJob={createJob({ jobDescription: "Original" })}
|
selectedJob={createJob({ jobDescription: "Original" })}
|
||||||
onSelectJobId={vi.fn()}
|
onSelectJobId={vi.fn()}
|
||||||
onJobUpdated={onJobUpdated}
|
onJobUpdated={onJobUpdated}
|
||||||
onSetActiveTab={vi.fn()}
|
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -245,7 +241,6 @@ describe("JobDetailPanel", () => {
|
|||||||
selectedJob={createJob({ status: "ready" })}
|
selectedJob={createJob({ status: "ready" })}
|
||||||
onSelectJobId={vi.fn()}
|
onSelectJobId={vi.fn()}
|
||||||
onJobUpdated={onJobUpdated}
|
onJobUpdated={onJobUpdated}
|
||||||
onSetActiveTab={vi.fn()}
|
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -268,7 +263,6 @@ describe("JobDetailPanel", () => {
|
|||||||
selectedJob={createJob({ status: "ready" })}
|
selectedJob={createJob({ status: "ready" })}
|
||||||
onSelectJobId={vi.fn()}
|
onSelectJobId={vi.fn()}
|
||||||
onJobUpdated={onJobUpdated}
|
onJobUpdated={onJobUpdated}
|
||||||
onSetActiveTab={vi.fn()}
|
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { fireEvent, render, screen } from "@testing-library/react";
|
import { fireEvent, render, screen } from "@testing-library/react";
|
||||||
import type { ComponentProps } from "react";
|
import type { ComponentProps } from "react";
|
||||||
import { describe, expect, it, vi } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
|
import type { JobSource } from "../../../shared/types";
|
||||||
import type { FilterTab, JobSort } from "./constants";
|
import type { FilterTab, JobSort } from "./constants";
|
||||||
import { OrchestratorFilters } from "./OrchestratorFilters";
|
import { OrchestratorFilters } from "./OrchestratorFilters";
|
||||||
|
|
||||||
@ -92,7 +93,7 @@ const renderFilters = (
|
|||||||
onSearchQueryChange: vi.fn(),
|
onSearchQueryChange: vi.fn(),
|
||||||
sourceFilter: "all" as const,
|
sourceFilter: "all" as const,
|
||||||
onSourceFilterChange: vi.fn(),
|
onSourceFilterChange: vi.fn(),
|
||||||
sourcesWithJobs: ["gradcracker", "linkedin", "manual"],
|
sourcesWithJobs: ["gradcracker", "linkedin", "manual"] as JobSource[],
|
||||||
sort: { key: "score", direction: "desc" } as JobSort,
|
sort: { key: "score", direction: "desc" } as JobSort,
|
||||||
onSortChange: vi.fn(),
|
onSortChange: vi.fn(),
|
||||||
...overrides,
|
...overrides,
|
||||||
|
|||||||
@ -7,9 +7,9 @@ import {
|
|||||||
PIPELINE_SOURCES_STORAGE_KEY,
|
PIPELINE_SOURCES_STORAGE_KEY,
|
||||||
} from "./constants";
|
} from "./constants";
|
||||||
|
|
||||||
const resolveAllowedSources = (enabledSources?: JobSource[]) =>
|
const resolveAllowedSources = (enabledSources?: readonly JobSource[]) =>
|
||||||
enabledSources && enabledSources.length > 0
|
enabledSources && enabledSources.length > 0
|
||||||
? enabledSources
|
? (enabledSources as JobSource[])
|
||||||
: DEFAULT_PIPELINE_SOURCES;
|
: DEFAULT_PIPELINE_SOURCES;
|
||||||
|
|
||||||
const normalizeSources = (
|
const normalizeSources = (
|
||||||
@ -24,7 +24,7 @@ const sourcesMatch = (left: JobSource[], right: JobSource[]) =>
|
|||||||
left.length === right.length &&
|
left.length === right.length &&
|
||||||
left.every((value, index) => value === right[index]);
|
left.every((value, index) => value === right[index]);
|
||||||
|
|
||||||
export const usePipelineSources = (enabledSources?: JobSource[]) => {
|
export const usePipelineSources = (enabledSources?: readonly JobSource[]) => {
|
||||||
const allowedSources = useMemo(
|
const allowedSources = useMemo(
|
||||||
() => resolveAllowedSources(enabledSources),
|
() => resolveAllowedSources(enabledSources),
|
||||||
[enabledSources],
|
[enabledSources],
|
||||||
|
|||||||
@ -2,6 +2,14 @@ import * as api from "@client/api";
|
|||||||
import { RefreshCw } from "lucide-react";
|
import { RefreshCw } from "lucide-react";
|
||||||
import type React from "react";
|
import type React from "react";
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from "@/components/ui/select";
|
||||||
|
|
||||||
type BaseResumeSelectionProps = {
|
type BaseResumeSelectionProps = {
|
||||||
value: string | null;
|
value: string | null;
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
|
"types": ["vitest/globals", "@testing-library/jest-dom"],
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"],
|
"@/*": ["src/*"],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user