feat: add AI Career Copilot AgentKit#102
feat: add AI Career Copilot AgentKit#102Durvankur-Joshi wants to merge 13 commits intoLamatic:mainfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis pull request introduces the complete AI Career Copilot assistant kit, a Next.js/React application that analyzes resume text and provides personalized career guidance. It includes frontend components, backend server actions, Lamatic AI flow configuration, and all necessary build/runtime configurations. Changes
Suggested reviewers
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Ready for Review
Looking forward to feedback 🚀 |
There was a problem hiding this comment.
Actionable comments posted: 14
🧹 Nitpick comments (9)
kits/assistant/ai-career-copilot/components/ErrorMessage.tsx (1)
19-25: Add explicittype="button"to prevent unintended form submission.The button lacks an explicit
typeattribute. If this component is ever rendered inside a form, the default type ("submit") could cause unintended form submissions.Proposed fix
<button + type="button" onClick={onRetry} className="mt-3 inline-flex items-center gap-2 text-sm text-red-700 hover:text-red-800 font-medium" >kits/assistant/ai-career-copilot/app/globals.css (1)
1-3: Stylelint configuration needs Tailwind support.The Stylelint errors flagging
@tailwindas unknown are false positives. Configure Stylelint withstylelint-config-tailwindcssor add@tailwindto theignoreAtRulesoption forscss/at-rule-no-unknown.Note: These
@tailwinddirectives follow Tailwind v3 syntax. If migrating to Tailwind v4+ per guidelines, the syntax would change to@import "tailwindcss";.kits/assistant/ai-career-copilot/components/SkillsDisplay.tsx (1)
15-15: Consider usinglucide-reacticons instead of emoji for consistency.Other components in this kit (e.g.,
ErrorMessage,RoadmapDisplay) uselucide-reacticons. For visual consistency across the kit, consider replacing the emoji with icons.Proposed changes
'use client'; +import { CheckCircle2, AlertTriangle } from 'lucide-react'; + interface SkillsDisplayProps {- <p className="text-sm font-medium text-gray-700 mb-2">✓ Your Current Skills</p> + <p className="text-sm font-medium text-gray-700 mb-2 flex items-center gap-1"> + <CheckCircle2 className="w-4 h-4 text-green-600" /> + Your Current Skills + </p>- <p className="text-sm font-medium text-gray-700 mb-2">⚠️ Skills to Develop</p> + <p className="text-sm font-medium text-gray-700 mb-2 flex items-center gap-1"> + <AlertTriangle className="w-4 h-4 text-yellow-600" /> + Skills to Develop + </p>Based on learnings: "Use lucide-react for icons throughout kits"
kits/assistant/ai-career-copilot/components/InterviewQuestions.tsx (1)
16-28: Minor: Empty state renders both container and message.When
questions.length === 0, the component renders an empty<div className="space-y-3">followed by the fallback message. Consider conditionally rendering either the list or the fallback.♻️ Suggested improvement
- <div className="space-y-3"> - {questions.map((question, idx) => ( - <div key={idx} className="flex items-start gap-3"> - <span className="flex-shrink-0 w-6 h-6 bg-gray-100 text-gray-600 rounded-full flex items-center justify-center text-xs font-semibold"> - {idx + 1} - </span> - <p className="text-gray-700">{question}</p> - </div> - ))} - </div> - {questions.length === 0 && ( - <p className="text-gray-500 text-center py-4">No interview questions available</p> - )} + {questions.length > 0 ? ( + <div className="space-y-3"> + {questions.map((question, idx) => ( + <div key={idx} className="flex items-start gap-3"> + <span className="flex-shrink-0 w-6 h-6 bg-gray-100 text-gray-600 rounded-full flex items-center justify-center text-xs font-semibold"> + {idx + 1} + </span> + <p className="text-gray-700">{question}</p> + </div> + ))} + </div> + ) : ( + <p className="text-gray-500 text-center py-4">No interview questions available</p> + )}kits/assistant/ai-career-copilot/components/CareerAnalysisForm.tsx (1)
24-51: Form handling should use react-hook-form with zod validation.The current implementation uses manual
useStateand custom validation logic. As per coding guidelines, kit forms should usereact-hook-formwithzodfor validation.♻️ Example refactor structure
import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; import { z } from 'zod'; const formSchema = z.object({ resumeText: z.string() .min(1, 'Please paste your resume text') .min(50, 'Please provide at least 50 characters of resume text for accurate analysis'), domain: z.string().min(1, 'Please select your target domain'), }); type FormData = z.infer<typeof formSchema>; export default function CareerAnalysisForm({ onSubmit }: CareerAnalysisFormProps) { const { register, handleSubmit, formState: { errors } } = useForm<FormData>({ resolver: zodResolver(formSchema), }); const onFormSubmit = (data: FormData) => { onSubmit(data.resumeText, data.domain); }; return ( <form onSubmit={handleSubmit(onFormSubmit)}> {/* ... */} </form> ); }As per coding guidelines: "Use react-hook-form with zod validation for form handling in kits"
kits/assistant/ai-career-copilot/components/AnalysisResult.tsx (1)
8-8: Remove unusedLightbulbimport.The
Lightbulbicon is imported but not used in this component.RoadmapDisplayimports it separately.♻️ Suggested fix
-import { TrendingUp, Briefcase, Lightbulb } from 'lucide-react'; +import { TrendingUp, Briefcase } from 'lucide-react';kits/assistant/ai-career-copilot/components/ProjectsDisplay.tsx (1)
16-26: Minor: Same empty state pattern issue as InterviewQuestions.The empty container is rendered alongside the fallback message when
projects.length === 0. Consider the same conditional rendering pattern suggested forInterviewQuestions.tsx.kits/assistant/ai-career-copilot/app/page.tsx (1)
69-71: Consider usinghandleResetinstead of page reload for retry.Using
window.location.reload()discards all client state and triggers a full page reload. The existinghandleResetfunction could provide a smoother UX.♻️ Suggested change
- <ErrorMessage message={error} onRetry={() => window.location.reload()} /> + <ErrorMessage message={error} onRetry={handleReset} />kits/assistant/ai-career-copilot/lib/lamatic-client.ts (1)
3-6: Add runtime validation for required environment variables.Non-null assertions (
!) will throw unclear errors if environment variables are missing. Consider adding explicit validation with meaningful error messages.♻️ Suggested improvement
-const endpoint = process.env.LAMATIC_API_URL!; -const apiKey = process.env.LAMATIC_API_KEY!; -const projectId = process.env.LAMATIC_PROJECT_ID!; -const flowId = process.env.AGENTIC_GENERATE_CONTENT!; +const endpoint = process.env.LAMATIC_API_URL; +const apiKey = process.env.LAMATIC_API_KEY; +const projectId = process.env.LAMATIC_PROJECT_ID; +const flowId = process.env.AGENTIC_GENERATE_CONTENT; + +function assertEnvVar(name: string, value: string | undefined): asserts value is string { + if (!value) { + throw new Error(`Missing required environment variable: ${name}`); + } +}Then validate before use:
async executeCareerAnalysis(input: { ... }) { assertEnvVar('LAMATIC_API_URL', endpoint); assertEnvVar('LAMATIC_API_KEY', apiKey); assertEnvVar('LAMATIC_PROJECT_ID', projectId); assertEnvVar('AGENTIC_GENERATE_CONTENT', flowId); // ... }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 847c6d93-1353-430e-85a7-4cf4415a242e
⛔ Files ignored due to path filters (1)
kits/assistant/ai-career-copilot/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (28)
kits/assistant/ai-career-copilot/.env.examplekits/assistant/ai-career-copilot/.gitignorekits/assistant/ai-career-copilot/README.mdkits/assistant/ai-career-copilot/actions/orchestrate.tskits/assistant/ai-career-copilot/app/globals.csskits/assistant/ai-career-copilot/app/layout.tsxkits/assistant/ai-career-copilot/app/page.tsxkits/assistant/ai-career-copilot/components/AnalysisResult.tsxkits/assistant/ai-career-copilot/components/CareerAnalysisForm.tsxkits/assistant/ai-career-copilot/components/ErrorMessage.tsxkits/assistant/ai-career-copilot/components/InterviewQuestions.tsxkits/assistant/ai-career-copilot/components/LoadingSpinner.tsxkits/assistant/ai-career-copilot/components/ProjectsDisplay.tsxkits/assistant/ai-career-copilot/components/RoadmapDisplay.tsxkits/assistant/ai-career-copilot/components/SkillsDisplay.tsxkits/assistant/ai-career-copilot/config.jsonkits/assistant/ai-career-copilot/flows/ai-career-copilot/README.mdkits/assistant/ai-career-copilot/flows/ai-career-copilot/config.jsonkits/assistant/ai-career-copilot/flows/ai-career-copilot/inputs.jsonkits/assistant/ai-career-copilot/flows/ai-career-copilot/meta.jsonkits/assistant/ai-career-copilot/gitkits/assistant/ai-career-copilot/lib/lamatic-client.tskits/assistant/ai-career-copilot/next.config.jskits/assistant/ai-career-copilot/package.jsonkits/assistant/ai-career-copilot/postcss.config.jskits/assistant/ai-career-copilot/tailwind.config.tskits/assistant/ai-career-copilot/tsconfig.jsonkits/assistant/ai-career-copilot/types/index.ts
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
kits/assistant/ai-career-copilot/.env.example (1)
1-4: Consider reordering keys to satisfy dotenv lint.
dotenv-linterflagged key ordering (LAMATIC_API_KEYbeforeLAMATIC_API_URL). Not functionally required, but aligning avoids CI/lint noise.kits/assistant/ai-career-copilot/README.md (1)
82-92: Add language identifiers to fenced code blocks (MD040).These fences should declare languages (
text,bash, etc.) to satisfy markdownlint and improve rendering consistency.Also applies to: 109-111, 121-123, 127-129
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fb395155-da54-4434-9636-cb8d36f4e7fa
📒 Files selected for processing (8)
kits/assistant/ai-career-copilot/.env.examplekits/assistant/ai-career-copilot/.gitignorekits/assistant/ai-career-copilot/README.mdkits/assistant/ai-career-copilot/actions/orchestrate.tskits/assistant/ai-career-copilot/app/layout.tsxkits/assistant/ai-career-copilot/config.jsonkits/assistant/ai-career-copilot/package.jsonkits/assistant/ai-career-copilot/tsconfig.json
✅ Files skipped from review due to trivial changes (5)
- kits/assistant/ai-career-copilot/tsconfig.json
- kits/assistant/ai-career-copilot/.gitignore
- kits/assistant/ai-career-copilot/config.json
- kits/assistant/ai-career-copilot/package.json
- kits/assistant/ai-career-copilot/app/layout.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- kits/assistant/ai-career-copilot/actions/orchestrate.ts
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5b1508b1-baef-4875-a28f-a9d2f0a82fbc
📒 Files selected for processing (1)
kits/assistant/ai-career-copilot/README.md
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
kits/assistant/ai-career-copilot/package.json (1)
33-33:⚠️ Potential issue | 🟠 MajorMission-critical fix: upgrade
tailwindcssto v4+ before launch.Line 33 still pins
tailwindcssto3.3.0, which is below the kit baseline. Update to a v4+ exact version to stay compliant with the styling standard.Based on learnings "Applies to kits/**/*.css : Use Tailwind CSS v4+ for styling kits".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@kits/assistant/ai-career-copilot/package.json` at line 33, The package.json currently pins "tailwindcss" to "3.3.0"; update that dependency to an exact v4+ version (for example "4.0.0" or the project's chosen exact release) in the "tailwindcss" entry so the kit uses Tailwind CSS v4+; after changing the version string, run your install (npm/yarn/pnpm) and verify the build and kit CSS files compile against the new Tailwind major to ensure compatibility.kits/assistant/ai-career-copilot/.env.example (1)
4-4:⚠️ Potential issue | 🟡 MinorMission log update: Previous directive still pending.
Agent, your dossier shows this directive was issued in a previous briefing but remains incomplete: append a trailing newline at EOF to satisfy dotenv linting protocols.
🧰 Tools
🪛 dotenv-linter (4.0.0)
[warning] 4-4: [EndingBlankLine] No blank line at the end of the file
(EndingBlankLine)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@kits/assistant/ai-career-copilot/.env.example` at line 4, The file lacks a trailing newline at EOF; add a single blank line (newline) at the end of the .env example so the final line "AGENTIC_GENERATE_CONTENT=YOUR_FLOW_ID" is terminated by a newline character to satisfy dotenv-linter's EndingBlankLine rule.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@kits/assistant/ai-career-copilot/.env.example`:
- Line 4: The env var AGENTIC_GENERATE_CONTENT is misnamed and should follow the
LAMATIC_* convention; rename it to LAMATIC_FLOW_ID in the .env.example and
update all usages in code (search for AGENTIC_GENERATE_CONTENT) including the
Lamatic client in lib/lamatic-client.ts to read process.env.LAMATIC_FLOW_ID (or
equivalent config accessor), ensure the placeholder value remains YOUR_FLOW_ID
and update any README or comments that reference the old variable name to the
new LAMATIC_FLOW_ID so runtime config remains consistent.
---
Duplicate comments:
In `@kits/assistant/ai-career-copilot/.env.example`:
- Line 4: The file lacks a trailing newline at EOF; add a single blank line
(newline) at the end of the .env example so the final line
"AGENTIC_GENERATE_CONTENT=YOUR_FLOW_ID" is terminated by a newline character to
satisfy dotenv-linter's EndingBlankLine rule.
In `@kits/assistant/ai-career-copilot/package.json`:
- Line 33: The package.json currently pins "tailwindcss" to "3.3.0"; update that
dependency to an exact v4+ version (for example "4.0.0" or the project's chosen
exact release) in the "tailwindcss" entry so the kit uses Tailwind CSS v4+;
after changing the version string, run your install (npm/yarn/pnpm) and verify
the build and kit CSS files compile against the new Tailwind major to ensure
compatibility.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 03254a02-69aa-4041-aaa2-9121fa0dac16
⛔ Files ignored due to path filters (1)
kits/assistant/ai-career-copilot/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
kits/assistant/ai-career-copilot/.env.examplekits/assistant/ai-career-copilot/package.json
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
♻️ Duplicate comments (2)
kits/assistant/ai-career-copilot/package.json (1)
33-33:⚠️ Potential issue | 🟠 MajorMission-critical dependency drift: upgrade Tailwind to v4+
Your kit still declares
tailwindcss: "3.4.1", which misses the kit baseline and can break consistency with v4-based styling expectations across kits.#!/bin/bash # Verify Tailwind major version in this kit package.json python - <<'PY' import json, re p = "kits/assistant/ai-career-copilot/package.json" v = json.load(open(p)).get("devDependencies", {}).get("tailwindcss", "") m = re.search(r'(\d+)', v) major = int(m.group(1)) if m else None print("tailwindcss:", v) print("major:", major) print("PASS (>=4):", major is not None and major >= 4) PYBased on learnings: "Applies to kits/**/*.css : Use Tailwind CSS v4+ for styling kits".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@kits/assistant/ai-career-copilot/package.json` at line 33, Update the kit's declared Tailwind dependency so it targets Tailwind CSS v4+ by changing the devDependencies entry for "tailwindcss" (the "tailwindcss" key in package.json) to a v4-compatible range (for example "^4.0.0"); after updating, run your package manager install (npm/yarn/pnpm) to refresh lockfile and node_modules and verify build/dev serves correctly, and if necessary update Tailwind config files (tailwind.config.*) to any new v4 option names or presets to ensure compatibility.kits/assistant/ai-career-copilot/tailwind.config.ts (1)
3-8:⚠️ Potential issue | 🟠 MajorMission-critical compatibility check: verify this legacy-style Tailwind config against the kit’s v4 styling standard.
Line 3 onward uses the classic config-file flow. If this kit is enforcing Tailwind v4 CSS-first styling, migrate/bridge with
@config+@themeand verify the installed Tailwind version is v4+.#!/bin/bash # Verify Tailwind version and styling config mode for this kit (read-only). set -euo pipefail echo "== Tailwind version in kit package.json ==" fd -t f "package.json" kits/assistant/ai-career-copilot --exec sh -c ' echo "--- {} ---" jq -r ".dependencies.tailwindcss // .devDependencies.tailwindcss // \"tailwindcss:not-found\"" "{}" ' echo echo "== CSS directives related to Tailwind v4/v3 config modes ==" rg -n --iglob '*.css' '@config|@theme|@import\s+"tailwindcss"|@tailwind\s+(base|components|utilities)' kits/assistant/ai-career-copilot echo echo "== Tailwind config files present ==" fd -t f 'tailwind.config.*' kits/assistant/ai-career-copilotBased on learnings: "Applies to kits/**/*.css : Use Tailwind CSS v4+ for styling kits".
Also applies to: 14-47
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@kits/assistant/ai-career-copilot/tailwind.config.ts` around lines 3 - 8, The tailwind.config.ts uses the legacy "content" config style (see the exported const config: Config) which must be migrated for kits enforcing Tailwind v4+ CSS-first styling; update the file to adopt the v4 pattern using `@config` and `@theme` instead of the legacy content array and ensure package.json has tailwindcss@^4 installed. Specifically, replace the legacy export (const config: Config = { content: [...] }) with the v4 CSS-first setup using `@config` and `@theme` entries, update any CSS files to use `@config/`@theme directives (search for `@tailwind/`@import occurrences), and verify/change the tailwindcss dependency in package.json to v4+ so the new config syntax is supported.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@kits/assistant/ai-career-copilot/package.json`:
- Line 33: Update the kit's declared Tailwind dependency so it targets Tailwind
CSS v4+ by changing the devDependencies entry for "tailwindcss" (the
"tailwindcss" key in package.json) to a v4-compatible range (for example
"^4.0.0"); after updating, run your package manager install (npm/yarn/pnpm) to
refresh lockfile and node_modules and verify build/dev serves correctly, and if
necessary update Tailwind config files (tailwind.config.*) to any new v4 option
names or presets to ensure compatibility.
In `@kits/assistant/ai-career-copilot/tailwind.config.ts`:
- Around line 3-8: The tailwind.config.ts uses the legacy "content" config style
(see the exported const config: Config) which must be migrated for kits
enforcing Tailwind v4+ CSS-first styling; update the file to adopt the v4
pattern using `@config` and `@theme` instead of the legacy content array and ensure
package.json has tailwindcss@^4 installed. Specifically, replace the legacy
export (const config: Config = { content: [...] }) with the v4 CSS-first setup
using `@config` and `@theme` entries, update any CSS files to use `@config/`@theme
directives (search for `@tailwind/`@import occurrences), and verify/change the
tailwindcss dependency in package.json to v4+ so the new config syntax is
supported.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: b8451d33-6a5c-43f4-bd0a-ec01dd4b2b91
⛔ Files ignored due to path filters (1)
kits/assistant/ai-career-copilot/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
kits/assistant/ai-career-copilot/package.jsonkits/assistant/ai-career-copilot/tailwind.config.tskits/assistant/ai-career-copilot/vercel.json
|
Hi @Durvankur-Joshi! 👋 Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review. Steps to follow:
This helps keep the review process efficient for everyone. Thank you! 🙏 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 9
♻️ Duplicate comments (1)
kits/assistant/ai-career-copilot/.env.example (1)
1-4:⚠️ Potential issue | 🟡 MinorMission note: normalize env key ordering to silence dotenv lint churn.
This file is valid, but current key order still triggers
UnorderedKeywarnings. Reorder for cleaner CI output.Proposed patch
LAMATIC_API_KEY=YOUR_API_KEY -LAMATIC_PROJECT_ID=YOUR_PROJECT_ID LAMATIC_API_URL=https://your-project.lamatic.dev/graphql LAMATIC_FLOW_ID=YOUR_FLOW_ID +LAMATIC_PROJECT_ID=YOUR_PROJECT_ID🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@kits/assistant/ai-career-copilot/.env.example` around lines 1 - 4, The .env.example triggers UnorderedKey warnings—reorder the environment variable keys into a normalized, deterministic order (e.g., alphabetically) to silence the dotenv lint churn; specifically reorder the LAMATIC_* entries so their sequence is consistent (LAMATIC_API_KEY, LAMATIC_API_URL, LAMATIC_FLOW_ID, LAMATIC_PROJECT_ID) ensuring the file contains the same keys but in that normalized order.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@kits/assistant/ai-career-copilot/app/page.tsx`:
- Around line 16-36: The onSubmit type in CareerAnalysisFormProps is declared as
synchronous but handleAnalyze is async; update the CareerAnalysisForm.tsx prop
type for onSubmit (CareerAnalysisFormProps.onSubmit) from (resumeText: string,
domain: string) => void to an async signature that returns Promise<void> so it
matches handleAnalyze and other async handlers, and update any call sites or
default props that assume a synchronous return to handle a Promise if necessary.
- Around line 69-71: The retry currently calls window.location.reload(), which
forces a full page reload and loses component state; change the ErrorMessage
onRetry handler to call the existing handleReset function instead so the error
is cleared and the component can retry without a full reload (update the onRetry
prop on the ErrorMessage in the JSX where the {error && ( ... )} block is
rendered to reference handleReset rather than window.location.reload()).
In `@kits/assistant/ai-career-copilot/components/AnalysisResult.tsx`:
- Line 8: Remove the unused Lightbulb icon import from the lucide-react import
in AnalysisResult.tsx; update the import statement to only import the icons
actually used (TrendingUp and Briefcase) so the unused symbol Lightbulb is
eliminated and the bundle weight reduced.
In `@kits/assistant/ai-career-copilot/components/LoadingSpinner.tsx`:
- Around line 5-16: The loading UI in LoadingSpinner.tsx doesn't announce
progress to assistive tech; update the top-level container (the outer div in the
LoadingSpinner component) to include role="status" and aria-live="polite", and
add a visually-hidden status string (e.g., a <span> with an "sr-only" class or
equivalent) that contains a short readable message like "Loading: analyzing your
career path" so screen readers will announce the loading state; ensure the
visually-hidden element is present inside the same container as the spinner so
it is read immediately.
In `@kits/assistant/ai-career-copilot/components/RoadmapDisplay.tsx`:
- Around line 11-29: Add the same `@radix-ui` packages and versions used by other
kits to this kit's package.json (copy the exact package names and versions from
a canonical kit like kits/automation/blog-automation), run install, and commit
updated lockfile; then refactor RoadmapDisplay.tsx, InterviewQuestions.tsx, and
ProjectsDisplay.tsx to replace raw div/card markup with the equivalent Radix
primitives used across the codebase (use the same primitives and composition
patterns as other kits — e.g., Radix components for cards,
lists/tabs/accordions, separators and accessible focus/keyboard handling),
keeping existing props/behavior (roadmap.map rendering, keys, Lightbulb usage,
empty-state message) intact and updating imports to the new `@radix-ui/react-`*
modules.
In `@kits/assistant/ai-career-copilot/lib/lamatic-client.ts`:
- Around line 3-6: Replace the non-null asserted env reads (endpoint, apiKey,
projectId, flowId) with runtime validation that fails fast: read each variable
via process.env, check for undefined/empty, and throw a descriptive Error
listing the missing variable(s) (or call a small helper like
ensureEnv/getRequiredEnv) in lamatic-client.ts so the application fails
immediately with a clear message if LAMATIC_API_URL, LAMATIC_API_KEY,
LAMATIC_PROJECT_ID, or LAMATIC_FLOW_ID are not set.
- Around line 38-48: The axios.post call that sends { query, variables } to
endpoint must include a hard timeout to avoid hanging requests; update the
request options in the function that calls axios.post in lib/lamatic-client.ts
to add a timeout (e.g., timeout: 5000) to the third-argument config object and
ensure the catch/error path for that function (the surrounding try/catch or the
function that calls post) treats timeout errors distinctly (log/throw a clear
timeout error). Locate the axios.post invocation and add the timeout field to
its config and adjust error handling to detect Axios timeout errors (e.g.,
error.code === 'ECONNABORTED') so callers get a deterministic failure instead of
a hung request.
- Around line 1-56: Replace the custom axios GraphQL wrapper in lamaticClient
with the official Lamatic SDK: import Lamatic and instantiate lamaticClient as
new Lamatic({ endpoint: process.env.LAMATIC_API_URL!, projectId:
process.env.LAMATIC_PROJECT_ID!, apiKey: process.env.LAMATIC_API_KEY! }); then
update the existing executeCareerAnalysis function (and remove manual
flowId/endpoint/apiKey headers usage) to call the SDK flow execution method
(e.g., lamaticClient.executeFlow or lamaticClient.executeWorkflow) passing
flowId and a payload { resume_text: input.resume_text, domain: input.domain },
return the SDK response result (res.data.data.executeWorkflow.result equivalent)
and surface/throw SDK errors as before; ensure you reference flowId when
invoking the SDK and remove the raw axios POST and GraphQL query/variables code.
In `@kits/assistant/ai-career-copilot/package.json`:
- Line 26: The dependency entry for "@tailwindcss/postcss" in package.json is
using a caret range (^4.2.2) instead of a pinned exact version; update that
dependency value to the exact version string (e.g., "4.2.2") so the kit's
package.json contains only pinned versions for reproducible installs and matches
the project's policy that each kit must pin its own dependencies.
---
Duplicate comments:
In `@kits/assistant/ai-career-copilot/.env.example`:
- Around line 1-4: The .env.example triggers UnorderedKey warnings—reorder the
environment variable keys into a normalized, deterministic order (e.g.,
alphabetically) to silence the dotenv lint churn; specifically reorder the
LAMATIC_* entries so their sequence is consistent (LAMATIC_API_KEY,
LAMATIC_API_URL, LAMATIC_FLOW_ID, LAMATIC_PROJECT_ID) ensuring the file contains
the same keys but in that normalized order.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: c606a8ba-07e8-4392-8b8c-b07d6e7cc862
⛔ Files ignored due to path filters (1)
kits/assistant/ai-career-copilot/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
kits/assistant/ai-career-copilot/.env.examplekits/assistant/ai-career-copilot/app/globals.csskits/assistant/ai-career-copilot/app/page.tsxkits/assistant/ai-career-copilot/components/AnalysisResult.tsxkits/assistant/ai-career-copilot/components/InterviewQuestions.tsxkits/assistant/ai-career-copilot/components/LoadingSpinner.tsxkits/assistant/ai-career-copilot/components/ProjectsDisplay.tsxkits/assistant/ai-career-copilot/components/RoadmapDisplay.tsxkits/assistant/ai-career-copilot/lib/lamatic-client.tskits/assistant/ai-career-copilot/package.jsonkits/assistant/ai-career-copilot/postcss.config.js
|
Hi maintainers, The validation workflow is failing due to a GitHub Actions permission issue: "Resource not accessible by integration (403)" All validation checks are passing successfully, but the workflow fails when trying to add labels/comments. Could you please re-run the workflow or merge if everything looks good? Thanks! |
|
Hi @d-pamneja, All requested changes have been addressed and all review conversations are resolved. I’ve also updated the branch with the latest base. The validation workflow is still failing due to a GitHub Actions permission issue (403), but all checks themselves are passing. Kindly review and merge if everything looks good. Thanks! |
🚀 AI Career Copilot
What This Kit Does
AI-powered career assistant that analyzes resumes and provides:
Providers & Prerequisites
How to Run Locally
Navigate to the project:
cd kits/assistant/ai-career-copilot
Install dependencies:
npm install
Set up environment variables:
cp .env.example .env
Add your Lamatic credentials in
.envRun the project:
npm run dev
Live Preview
https://your-vercel-link.vercel.app/
Lamatic Flow
Flow ID:
66c98d92-70da-4eec-82b0-af4f01be9cd5Files Added
Configuration & Setup Files:
.env.example– Environment variable placeholders for Lamatic API credentials (LAMATIC_API_KEY, LAMATIC_PROJECT_ID, LAMATIC_API_URL, LAMATIC_FLOW_ID).gitignore– Development artifact exclusions (node_modules, .next, .env, coverage, build directories, OS files)config.json– Assistant metadata defining name, version, description, capabilities, Node.js/npm requirementspackage.json– npm dependencies (Next.js, React, Axios, Tailwind CSS v4, Lucide icons, TypeScript)tsconfig.json– TypeScript configuration with strict mode, path aliases, incremental buildsnext.config.js– Next.js settings (React strict mode, SWC minification, remote image domains, environment variable exposure)postcss.config.js– PostCSS configuration with Tailwind CSS v4 (@tailwindcss/postcss) pluginvercel.json– Vercel deployment configurationFrontend Components:
app/layout.tsx– Root Next.js layout with metadata (title, description, keywords, Open Graph) and Google Inter fontapp/page.tsx– Home page with form submission, loading/error states, and result displayapp/globals.css– Global Tailwind styles and utility classes (.btn-primary, .btn-secondary, .card, .input-field)components/CareerAnalysisForm.tsx– Form with resume textarea and domain dropdown; validates minimum 50 characterscomponents/AnalysisResult.tsx– Displays readiness score, skills, roadmap, projects, interview questions, and recommended rolescomponents/SkillsDisplay.tsx– Shows current skills (green badges) and missing skills (yellow badges)components/RoadmapDisplay.tsx– Numbered learning roadmap stepscomponents/ProjectsDisplay.tsx– List of recommended projectscomponents/InterviewQuestions.tsx– Numbered interview practice questionscomponents/LoadingSpinner.tsx– Animated dual-ring spinner with pulsing statuscomponents/ErrorMessage.tsx– Error display with optional "Try Again" buttonServer & API Layer:
actions/orchestrate.ts– Server actionanalyzeCareer()that validates input, calls Lamatic client, handles errors, returns typed responselib/lamatic-client.ts– GraphQL client executing career analysis workflow via Lamatic with Authorization and x-project-id headersType Definitions:
types/index.ts– TypeScript interfaces for CareerAnalysisInput, CareerAnalysisOutput, and ApiResponseLamatic Flow Files:
flows/ai-career-copilot/README.md– Flow documentation, setup instructions, and contribution guidelinesflows/ai-career-copilot/config.json– Complete workflow configuration (see flow details)flows/ai-career-copilot/inputs.json– Model selection configuration for 6 InstructorLLMNode instancesflows/ai-career-copilot/meta.json– Flow metadataDocumentation:
README.md– Project overview, feature list, tech stack, prerequisites, setup, and Vercel deployment instructionsLamatic Flow Architecture
Flow Type: Synchronous GraphQL-triggered workflow returning consolidated JSON response
Input Parameters:
resume_text(string)domain(string)Processing Pipeline (9 Sequential Nodes):
Data Flow: Linear sequential pipeline where each LLM node receives extracted skills and domain context, processes via system+user prompts, and returns structured JSON following a schema. Final response node aggregates all node outputs into unified API response with application/json content-type header.
Summary: End-to-end resume analysis workflow that performs skill extraction via regex matching, identifies gaps for target domain, recommends entry-level roles, scores job readiness (0–100 scale), generates step-by-step learning path, suggests practical portfolio projects, and provides interview preparation questions—all delivered synchronously through single GraphQL API call.