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.

fix settings layout issues when ai chat panel expanded

Khuram Niazf8ab761cb168
diff --git a/src/components/settings/AiSettings.tsx b/src/components/settings/AiSettings.tsx
index fabbb58..f7b6e52 100644
--- a/src/components/settings/AiSettings.tsx
+++ b/src/components/settings/AiSettings.tsx
@@ -253,7 +253,7 @@ function AiSettings() {
<Label className="my-4" htmlFor="ai-model">
Model
</Label>
- <div className="flex items-start gap-2">
+ <div className="flex flex-wrap items-start gap-2">
<Select
value={isLoadingModels ? undefined : selectedModel.model}
onValueChange={setSelectedProviderModel}
@@ -281,13 +281,13 @@ function AiSettings() {
</SelectContent>
</Select>
{fetchError && (
- <div className="flex items-center gap-1 text-red-600 text-sm mt-2">
- <XCircle className="h-4 w-4 shrink-0" />
+ <div className="flex items-start gap-1 text-red-600 text-sm mt-2">
+ <XCircle className="h-4 w-4 shrink-0 mt-0.5" />
<span>{fetchError}</span>
</div>
)}
{connectionError && (
- <div className="flex items-center gap-1 mt-2">
+ <div className="flex items-start gap-2 mt-2">
<Button
variant="outline"
size="sm"
@@ -298,8 +298,8 @@ function AiSettings() {
<RefreshCw className={`h-3.5 w-3.5 ${isLoadingModels ? "animate-spin" : ""}`} />
Retry
</Button>
- <div className="flex items-center gap-1 text-red-600 text-sm">
- <XCircle className="h-4 w-4 shrink-0" />
+ <div className="flex items-start gap-1 text-red-600 text-sm">
+ <XCircle className="h-4 w-4 shrink-0 mt-0.5" />
<span>{connectionError}</span>
</div>
</div>
diff --git a/src/components/settings/DisplaySettings.tsx b/src/components/settings/DisplaySettings.tsx
index 3124313..25a9b8c 100644
--- a/src/components/settings/DisplaySettings.tsx
+++ b/src/components/settings/DisplaySettings.tsx
@@ -17,7 +17,10 @@ import { toastSuccess, toastError } from "@/lib/toast";
import { Button } from "../ui/button";
import { useTheme } from "next-themes";
import { Loader2 } from "lucide-react";
-import { getUserSettings, updateDisplaySettings } from "@/actions/userSettings.actions";
+import {
+ getUserSettings,
+ updateDisplaySettings,
+} from "@/actions/userSettings.actions";
const appearanceFormSchema = z.object({
theme: z.enum(["light", "dark", "system"], {
@@ -107,75 +110,72 @@ function DisplaySettings() {
Customize the look and feel of the application.
</p>
</div>
- <div>
- <Form {...form}>
- <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
- <FormField
- control={form.control}
- name="theme"
- render={({ field }) => (
- <FormItem className="space-y-1">
- <FormLabel>Theme</FormLabel>
- <FormDescription>
- Select the theme for the app.
- </FormDescription>
- <FormMessage />
- <RadioGroup
- onValueChange={field.onChange}
- value={field.value}
- className="grid max-w-lg md:grid-cols-3 gap-8 pt-2"
- >
- <FormItem>
- <FormLabel className="[&:has([data-state=checked])>div]:border-primary">
- <FormControl>
- <RadioGroupItem value="light" className="sr-only" />
- </FormControl>
- <LightThemeElement />
- <span className="block w-full p-2 text-center font-normal">
- Light
- </span>
- </FormLabel>
- </FormItem>
- <FormItem>
- <FormLabel className="[&:has([data-state=checked])>div]:border-primary">
- <FormControl>
- <RadioGroupItem value="dark" className="sr-only" />
- </FormControl>
+ <div className="@container">
+ <Form {...form}>
+ <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
+ <FormField
+ control={form.control}
+ name="theme"
+ render={({ field }) => (
+ <FormItem className="space-y-1">
+ <FormLabel>Theme</FormLabel>
+ <FormDescription>
+ Select the theme for the app.
+ </FormDescription>
+ <FormMessage />
+ <RadioGroup
+ onValueChange={field.onChange}
+ value={field.value}
+ className="grid max-w-lg @md:grid-cols-3 gap-8 pt-2"
+ >
+ <FormItem>
+ <FormLabel className="[&:has([data-state=checked])>div]:border-primary">
+ <FormControl>
+ <RadioGroupItem value="light" className="sr-only" />
+ </FormControl>
+ <LightThemeElement />
+ <span className="block w-full p-2 text-center font-normal">
+ Light
+ </span>
+ </FormLabel>
+ </FormItem>
+ <FormItem>
+ <FormLabel className="[&:has([data-state=checked])>div]:border-primary">
+ <FormControl>
+ <RadioGroupItem value="dark" className="sr-only" />
+ </FormControl>
+ <DarkThemeElement />
+ <span className="block w-full p-2 text-center font-normal">
+ Dark
+ </span>
+ </FormLabel>
+ </FormItem>
+ <FormItem>
+ <FormLabel className="[&:has([data-state=checked])>div]:border-primary">
+ <FormControl>
+ <RadioGroupItem value="system" className="sr-only" />
+ </FormControl>
+ {systemTheme === "dark" ? (
<DarkThemeElement />
- <span className="block w-full p-2 text-center font-normal">
- Dark
- </span>
- </FormLabel>
- </FormItem>
- <FormItem>
- <FormLabel className="[&:has([data-state=checked])>div]:border-primary">
- <FormControl>
- <RadioGroupItem
- value="system"
- className="sr-only"
- />
- </FormControl>
- {systemTheme === "dark" ? (
- <DarkThemeElement />
- ) : (
- <LightThemeElement />
- )}
- <span className="block w-full p-2 text-center font-normal">
- System
- </span>
- </FormLabel>
- </FormItem>
- </RadioGroup>
- </FormItem>
- )}
- />
+ ) : (
+ <LightThemeElement />
+ )}
+ <span className="block w-full p-2 text-center font-normal">
+ System
+ </span>
+ </FormLabel>
+ </FormItem>
+ </RadioGroup>
+ </FormItem>
+ )}
+ />
- <Button type="submit" disabled={isSaving}>
- {isSaving && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
- Update preferences
- </Button>
- </form>
- </Form>
+ <Button type="submit" disabled={isSaving}>
+ {isSaving && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
+ Save
+ </Button>
+ </form>
+ </Form>
</div>
</div>
);
@@ -188,16 +188,16 @@ function LightThemeElement() {
<div className="cursor-pointer items-center rounded-md border-2 border-muted p-1 hover:border-accent">
<div className="space-y-2 rounded-sm bg-[#ecedef] p-2">
<div className="space-y-2 rounded-md bg-white p-2 shadow-xs">
- <div className="h-2 w-[80px] rounded-lg bg-[#ecedef]" />
- <div className="h-2 w-[100px] rounded-lg bg-[#ecedef]" />
+ <div className="h-2 w-4/5 rounded-lg bg-[#ecedef]" />
+ <div className="h-2 w-full rounded-lg bg-[#ecedef]" />
</div>
<div className="flex items-center space-x-2 rounded-md bg-white p-2 shadow-xs">
<div className="h-4 w-4 rounded-full bg-[#ecedef]" />
- <div className="h-2 w-[100px] rounded-lg bg-[#ecedef]" />
+ <div className="h-2 w-full rounded-lg bg-[#ecedef]" />
</div>
<div className="flex items-center space-x-2 rounded-md bg-white p-2 shadow-xs">
<div className="h-4 w-4 rounded-full bg-[#ecedef]" />
- <div className="h-2 w-[100px] rounded-lg bg-[#ecedef]" />
+ <div className="h-2 w-full rounded-lg bg-[#ecedef]" />
</div>
</div>
</div>
@@ -208,16 +208,16 @@ function DarkThemeElement() {
<div className="cursor-pointer items-center rounded-md border-2 border-muted bg-popover p-1 hover:bg-accent hover:text-accent-foreground">
<div className="space-y-2 rounded-sm bg-slate-950 p-2">
<div className="space-y-2 rounded-md bg-slate-800 p-2 shadow-xs">
- <div className="h-2 w-[80px] rounded-lg bg-slate-400" />
- <div className="h-2 w-[100px] rounded-lg bg-slate-400" />
+ <div className="h-2 w-4/5 rounded-lg bg-slate-400" />
+ <div className="h-2 w-full rounded-lg bg-slate-400" />
</div>
<div className="flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-xs">
<div className="h-4 w-4 rounded-full bg-slate-400" />
- <div className="h-2 w-[100px] rounded-lg bg-slate-400" />
+ <div className="h-2 w-full rounded-lg bg-slate-400" />
</div>
<div className="flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-xs">
<div className="h-4 w-4 rounded-full bg-slate-400" />
- <div className="h-2 w-[100px] rounded-lg bg-slate-400" />
+ <div className="h-2 w-full rounded-lg bg-slate-400" />
</div>
</div>
</div>
diff --git a/src/components/settings/McpAccessSettings.tsx b/src/components/settings/McpAccessSettings.tsx
index 65e316e..e621c0b 100644
--- a/src/components/settings/McpAccessSettings.tsx
+++ b/src/components/settings/McpAccessSettings.tsx
@@ -226,12 +226,12 @@ export default function McpAccessSettings() {
</Card>
<Card>
- <CardHeader className="flex-row items-start justify-between">
- <div>
+ <CardHeader className="flex-row flex-wrap items-start justify-between gap-2">
+ <div className="min-w-0">
<CardTitle>Personal Access Tokens</CardTitle>
<CardDescription>Tokens authenticate external agents to call MCP tools.</CardDescription>
</div>
- <Button size="sm" onClick={() => setShowGenerateDialog(true)} disabled={isLoading}>
+ <Button size="sm" className="shrink-0" onClick={() => setShowGenerateDialog(true)} disabled={isLoading}>
<Plus className="h-4 w-4 mr-1" />
Generate
</Button>
@@ -246,7 +246,7 @@ export default function McpAccessSettings() {
) : (
<div className="space-y-3">
{tokens.map((t) => (
- <div key={t.id} className="flex items-center justify-between border rounded-sm p-3 gap-3">
+ <div key={t.id} className="flex items-start justify-between border rounded-sm p-3 gap-3">
<div className="min-w-0 flex-1">
<p className="font-medium text-sm truncate">{t.name}</p>
<p className="text-xs text-muted-foreground font-mono">{t.tokenPrefix}…</p>
@@ -255,7 +255,7 @@ export default function McpAccessSettings() {
<span>Expires {format(new Date(t.expiresAt), "PP")}</span>
{t.lastUsedAt && <span>Last used {format(new Date(t.lastUsedAt), "PP")}</span>}
</div>
- <div className="flex gap-1 mt-1">
+ <div className="flex flex-wrap gap-1 mt-1">
{t.scopes.map((s) => (
<Badge key={s} variant="secondary" className="text-xs">{s}</Badge>
))}