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