Skip to content

Commit 3b74a4b

Browse files
authored
Merge branch 'main' into async-opportunity-parsing
2 parents 66cb6f6 + 070b67f commit 3b74a4b

13 files changed

Lines changed: 171 additions & 61 deletions

File tree

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
jobs:
44
install_deps:
55
docker:
6-
- image: cimg/node:22.11
6+
- image: cimg/node:22.22
77
steps:
88
- checkout
99
- run:
@@ -28,7 +28,7 @@ jobs:
2828
- ./packages/extension/node_modules
2929
test_extension:
3030
docker:
31-
- image: cimg/node:22.11
31+
- image: cimg/node:22.22
3232
parallelism: 1
3333
steps:
3434
- checkout
@@ -49,7 +49,7 @@ jobs:
4949
path: ./test-results
5050
test_webapp:
5151
docker:
52-
- image: cimg/node:22.11
52+
- image: cimg/node:22.22
5353
parallelism: 1
5454
steps:
5555
- checkout
@@ -70,7 +70,7 @@ jobs:
7070
path: ./test-results
7171
lint_shared:
7272
docker:
73-
- image: cimg/node:22.11
73+
- image: cimg/node:22.22
7474
resource_class: large
7575
steps:
7676
- checkout
@@ -84,7 +84,7 @@ jobs:
8484
working_directory: packages/shared
8585
test_shared:
8686
docker:
87-
- image: cimg/node:22.11
87+
- image: cimg/node:22.22
8888
parallelism: 1
8989
steps:
9090
- checkout
@@ -104,7 +104,7 @@ jobs:
104104
path: ./test-results
105105
build_extension:
106106
docker:
107-
- image: cimg/node:22.11
107+
- image: cimg/node:22.22
108108
resource_class: large
109109
steps:
110110
- checkout

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup Node.js
2020
uses: actions/setup-node@v4
2121
with:
22-
node-version: '22.11'
22+
node-version: '22.22'
2323

2424
- name: Install pnpm
2525
uses: pnpm/action-setup@v4

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.11
1+
22.22

AGENTS.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This is a pnpm monorepo containing the daily.dev application suite:
2626

2727
## Technology Stack
2828

29-
- **Node.js v22.11** (see `package.json` `volta` and `packageManager` properties, also `.nvmrc`)
29+
- **Node.js v22.22** (see `package.json` `volta` and `packageManager` properties, also `.nvmrc`)
3030
- **pnpm 9.14.4** for package management (see `package.json` `packageManager` property)
3131
- **TypeScript** across all packages
3232
- **React 18.3.1** with Next.js 15 for webapp (Pages Router, NOT App Router/Server Components)
@@ -293,4 +293,16 @@ When reviewing code (or writing code that will be reviewed):
293293
- **Delete dead code** - Remove unused components, functions, exports, and files. Don't leave code "for later"
294294
- **Avoid confusing naming** - Don't create multiple components with the same name in different locations (e.g., two `AboutMe` components)
295295
- **Remove unused exports** - If a function/constant is only used internally, don't export it
296-
- **Clean up duplicates** - If the same interface/type is defined in multiple places, consolidate to one location and import
296+
- **Clean up duplicates** - If the same interface/type is defined in multiple places, consolidate to one location and import
297+
298+
## Node.js Version Upgrade Checklist
299+
300+
When upgrading Node.js version, update these files:
301+
- `.nvmrc`
302+
- `Dockerfile`
303+
- `.github/workflows/e2e-tests.yml`
304+
- `.circleci/config.yml` (multiple occurrences)
305+
- `packages/playwright/package.json` (engines field)
306+
- This file (`CLAUDE.md` - Technology Stack section)
307+
308+
After updating, run `pnpm install` to check if lock file needs updating and commit any changes.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:22.11-alpine
1+
FROM node:22.22-alpine
22
RUN apk add g++ make python3
33

44
RUN mkdir -p /opt/app

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
"patchedDependencies": {
1717
"graphql-request@3.7.0": "patches/graphql-request@3.7.0.patch"
1818
}
19+
},
20+
"volta": {
21+
"node": "22.22.0"
1922
}
2023
}

packages/extension/src/background/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const sendBootData = async (_, tab: Tabs.Tab) => {
5252

5353
const [deviceId, boot] = await Promise.all([
5454
getOrGenerateDeviceId(),
55-
getBootData('companion', href),
55+
getBootData({ app: 'companion', url: href }),
5656
]);
5757

5858
let settingsOutput = boot.settings;

packages/playwright/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"typescript": "^5.6.0"
1919
},
2020
"engines": {
21-
"node": ">=22.11.0"
21+
"node": ">=22.22.0"
2222
},
2323
"dependencies": {
2424
"dotenv": "^17.2.1"

packages/shared/src/components/recruiter/FeedbackList.tsx

Lines changed: 100 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ import {
66
TypographyColor,
77
TypographyType,
88
} from '../typography/Typography';
9-
import { FlexCol, FlexRow } from '../utilities';
10-
import type { FeedbackClassification } from '../../features/opportunity/types';
9+
import { FlexCol } from '../utilities';
10+
import type {
11+
AnonymousUserContext,
12+
FeedbackClassification,
13+
} from '../../features/opportunity/types';
1114
import {
1215
FeedbackSentiment,
1316
FeedbackUrgency,
1417
} from '../../features/opportunity/types';
18+
import { getRecruiterExperienceLevelLabel } from '../../lib/user';
1519

1620
const getSentimentLabel = (sentiment: FeedbackSentiment): string => {
1721
switch (sentiment) {
@@ -26,7 +30,20 @@ const getSentimentLabel = (sentiment: FeedbackSentiment): string => {
2630
}
2731
};
2832

29-
const getSentimentStyles = (sentiment: FeedbackSentiment): string => {
33+
const getSentimentBorderColor = (sentiment: FeedbackSentiment): string => {
34+
switch (sentiment) {
35+
case FeedbackSentiment.Positive:
36+
return 'border-l-accent-avocado-default';
37+
case FeedbackSentiment.Neutral:
38+
return 'border-l-border-subtlest-tertiary';
39+
case FeedbackSentiment.Negative:
40+
return 'border-l-accent-ketchup-default';
41+
default:
42+
return 'border-l-border-subtlest-tertiary';
43+
}
44+
};
45+
46+
const getSentimentBadgeStyles = (sentiment: FeedbackSentiment): string => {
3047
switch (sentiment) {
3148
case FeedbackSentiment.Positive:
3249
return 'bg-action-upvote-float text-action-upvote-default';
@@ -42,31 +59,66 @@ const getSentimentStyles = (sentiment: FeedbackSentiment): string => {
4259
const getUrgencyLabel = (urgency: FeedbackUrgency): string => {
4360
switch (urgency) {
4461
case FeedbackUrgency.Low:
45-
return 'Low';
62+
return 'Low priority';
4663
case FeedbackUrgency.Medium:
47-
return 'Medium';
64+
return 'Medium priority';
4865
case FeedbackUrgency.High:
49-
return 'High';
66+
return 'High priority';
5067
case FeedbackUrgency.Critical:
5168
return 'Critical';
5269
default:
53-
return 'Unknown';
70+
return '';
5471
}
5572
};
5673

5774
const getUrgencyStyles = (urgency: FeedbackUrgency): string => {
5875
switch (urgency) {
5976
case FeedbackUrgency.Low:
60-
return 'bg-action-upvote-float text-action-upvote-default';
77+
return 'text-text-tertiary';
6178
case FeedbackUrgency.Medium:
62-
return 'bg-overlay-quaternary-onion text-accent-onion-default';
79+
return 'text-accent-onion-default';
6380
case FeedbackUrgency.High:
64-
return 'bg-overlay-quaternary-bacon text-accent-bacon-default';
81+
return 'text-accent-bacon-default';
6582
case FeedbackUrgency.Critical:
66-
return 'bg-action-downvote-float text-action-downvote-default';
83+
return 'text-accent-ketchup-default';
6784
default:
68-
return 'bg-surface-tertiary text-text-secondary';
85+
return 'text-text-tertiary';
86+
}
87+
};
88+
89+
interface UserContextDisplayProps {
90+
userContext: AnonymousUserContext;
91+
}
92+
93+
const UserContextDisplay = ({
94+
userContext,
95+
}: UserContextDisplayProps): ReactElement | null => {
96+
const seniorityLabel = getRecruiterExperienceLevelLabel(
97+
userContext.seniority ?? undefined,
98+
);
99+
100+
const hasAnyData = seniorityLabel || userContext.locationCountry;
101+
102+
if (!hasAnyData) {
103+
return null;
69104
}
105+
106+
const infoParts: string[] = [];
107+
if (seniorityLabel) {
108+
infoParts.push(`${seniorityLabel} experience`);
109+
}
110+
if (userContext.locationCountry) {
111+
infoParts.push(userContext.locationCountry);
112+
}
113+
114+
return (
115+
<Typography
116+
type={TypographyType.Caption1}
117+
color={TypographyColor.Secondary}
118+
>
119+
{infoParts.join(' · ')}
120+
</Typography>
121+
);
70122
};
71123

72124
interface FeedbackCardProps {
@@ -76,44 +128,53 @@ interface FeedbackCardProps {
76128
const FeedbackCard = ({ feedback }: FeedbackCardProps): ReactElement => {
77129
const showSentiment = feedback.sentiment !== FeedbackSentiment.Unspecified;
78130
const showUrgency = feedback.urgency !== FeedbackUrgency.Unspecified;
131+
const hasUserContext = feedback.userContext;
79132

80133
return (
81-
<FlexCol className="gap-4 rounded-16 border border-border-subtlest-tertiary bg-surface-float p-4">
82-
{(showSentiment || showUrgency) && (
83-
<FlexRow className="flex-wrap items-center gap-2">
84-
{showSentiment && (
85-
<span
86-
className={classNames(
87-
'rounded-8 px-2 py-1 typo-footnote',
88-
getSentimentStyles(feedback.sentiment),
89-
)}
90-
>
91-
{getSentimentLabel(feedback.sentiment)}
92-
</span>
93-
)}
94-
{showUrgency && (
95-
<span
96-
className={classNames(
97-
'rounded-8 px-2 py-1 typo-footnote',
98-
getUrgencyStyles(feedback.urgency),
99-
)}
100-
>
101-
{getUrgencyLabel(feedback.urgency)} urgency
102-
</span>
103-
)}
104-
</FlexRow>
134+
<div
135+
className={classNames(
136+
'flex flex-col gap-3 rounded-12 border border-l-4 border-border-subtlest-tertiary bg-background-subtle p-4',
137+
getSentimentBorderColor(feedback.sentiment),
105138
)}
139+
>
140+
{/* Header with sentiment badge and urgency */}
141+
<div className="flex items-center justify-between">
142+
{showSentiment && (
143+
<span
144+
className={classNames(
145+
'rounded-8 px-2 py-0.5 font-bold typo-caption1',
146+
getSentimentBadgeStyles(feedback.sentiment),
147+
)}
148+
>
149+
{getSentimentLabel(feedback.sentiment)}
150+
</span>
151+
)}
152+
{showUrgency && (
153+
<Typography
154+
type={TypographyType.Caption1}
155+
className={getUrgencyStyles(feedback.urgency)}
156+
>
157+
{getUrgencyLabel(feedback.urgency)}
158+
</Typography>
159+
)}
160+
</div>
106161

162+
{/* Feedback quote */}
107163
{feedback.answer && (
108164
<Typography
109165
type={TypographyType.Callout}
110-
color={TypographyColor.Secondary}
166+
color={TypographyColor.Primary}
111167
className="whitespace-pre-wrap break-words"
112168
>
113169
&ldquo;{feedback.answer}&rdquo;
114170
</Typography>
115171
)}
116-
</FlexCol>
172+
173+
{/* User context - seniority and location */}
174+
{hasUserContext && (
175+
<UserContextDisplay userContext={feedback.userContext} />
176+
)}
177+
</div>
117178
);
118179
};
119180

@@ -123,7 +184,7 @@ export interface FeedbackListProps {
123184

124185
export const FeedbackList = ({ feedback }: FeedbackListProps): ReactElement => {
125186
return (
126-
<FlexCol className="gap-4">
187+
<FlexCol className="gap-3">
127188
{feedback.length > 0 ? (
128189
feedback.map((item, index) => (
129190
<FeedbackCard key={item.answer ?? index} feedback={item} />

packages/shared/src/contexts/BootProvider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ export const BootDataProvider = ({
178178
} = useQuery<Partial<Boot>>({
179179
queryKey: BOOT_QUERY_KEY,
180180
queryFn: async () => {
181-
const result = await getBootData(app);
181+
const pathname = globalThis?.location?.pathname;
182+
const result = await getBootData({ app, pathname });
182183
preloadFeedsRef.current({ feeds: result.feeds, user: result.user });
183184

184185
return result;

0 commit comments

Comments
 (0)