Skip to content

Feat/ai internship filled cohort#117

Merged
sjoerdbeentjes merged 16 commits into
mainfrom
feat/ai-internship-filled-cohort
Jun 10, 2026
Merged

Feat/ai internship filled cohort#117
sjoerdbeentjes merged 16 commits into
mainfrom
feat/ai-internship-filled-cohort

Conversation

@sjoerdbeentjes

@sjoerdbeentjes sjoerdbeentjes commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Changes

Filled internship positions (position_filled)

  • New boolean field position_filled on the ai_internship model (default false), set by agencies in their own profile.
  • Overview (AiInternshipList): filled internships get a "Filled" tag, are shown greyed out, and are sorted to the bottom (open ones first; shuffle stays stable within each group for fairness).
  • Detail page stays clickable, but for a filled internship the application form is replaced by a status message ([id]/index.astro).
  • New "Hide filled internships" filter (checkbox, off by default) → filters on positionFilled: { eq: false }.

Cohorts (cohort) — data model only

  • New 🎓 Cohort model (name + start_date).
  • Single-link cohort field on ai_internship (optional).
  • Fields are already fetched in fragments/queries, but no filter UI yet — there's only one cohort for now. A cohort filter can be added later in AiInternshipList like track/province/language.

Application form improvements

  • New reusable Textarea form component.
  • Added an optional open question field (message) to the application form; linkedin is now required.
  • Form submissions now pass message through to the email templates; agency subject line is now templated to include the vacancy title via fillTemplate.
  • Migration 1780963200_aiInternshipFormImprovements adds the open_question translation and updates the agency + confirmation email templates (vacancy name in subject/body, open-question answer in body).

Migrations / environment

  • DatoCMS migrations: position_filled field, cohort model + link, form/email improvements.
  • Bumped datocmsEnvironment to release-ai-internship-filled.

Associated issue

How to test

  1. Open the preview link.
  2. In DatoCMS, mark an AI internship as Position filled.
  3. On the AI internships overview, verify the filled item shows a "Filled" tag, is greyed out, and sorts to the bottom.
  4. Toggle Hide filled internships and verify filled items disappear.
  5. Open a filled internship's detail page → confirm it's reachable and shows the "filled" message instead of the form.
  6. Open an open internship → submit the form; verify LinkedIn is required and the optional open-question field works.
  7. Verify the agency and confirmation emails include the vacancy title and the open-question answer.

Checklist

  • I have performed a self-review of my own code
  • I have made sure that my PR is easy to review (not too big, includes comments)
  • I have updated relevant documentation files (see docs/ai-internships-followup.md, incl. DatoCMS deploy runbook)
  • I have added a decision log entry if the change affects the architecture or changes a significant technology
  • I have notified a reviewer

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploying dda-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0f94ea6
Status:⚡️  Build in progress...

View logs

@sjoerdbeentjes sjoerdbeentjes force-pushed the feat/ai-internship-filled-cohort branch from 3141064 to fed6f4d Compare June 9, 2026 09:31
@sjoerdbeentjes sjoerdbeentjes requested a review from slimluccii June 9, 2026 09:31
sjoerdbeentjes and others added 8 commits June 9, 2026 13:02
- Exclude config/datocms/migrations from TypeScript type checking to fix 25
  type errors caused by version mismatches with DatoCMS client types
- Update prep:cloudflare-env script to populate .dev.vars with SESSION=
  binding to prevent Vitest errors with Cloudflare adapter
SCW_PROJECT_ID and TURNSTILE_SITE_KEY are public env schema fields
without defaults, so Astro treats empty strings as missing during
build validation. Use the official Turnstile dummy site key.
The hoisted vite was still 5.4.21 while Astro 5.18 ships vite 6, so
vitest ran Astro's vite plugins against a vite 5 plugin container that
lacks this.environment, crashing every test file. Pin vite 6 and
upgrade vitest to v3 (which also fixes the 'test' property type error
in vitest.config.ts). html-validate moves to v11 to satisfy vitest 3
peer deps; its new unique-landmark rule is disabled to keep parity
with the v8 ruleset.
Astro validates public env vars when modules import astro:env (unit
tests) and secret vars during prerendering (build), so every job needs
non-empty values for the new SCW and Turnstile variables.
html-validate 11 requires Node 22+ (fs.globSync); v10 supports
Node 20 and still satisfies the vitest 3 peer dependency.

import './Textarea.css';

type Props = {

@slimluccii slimluccii Jun 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to have maybe. Do something like ComponentProps<HeadlessTextarea> & ... and spread the props.

@sjoerdbeentjes sjoerdbeentjes force-pushed the feat/ai-internship-filled-cohort branch from 5e557b8 to 16f7e17 Compare June 10, 2026 15:02
@sjoerdbeentjes sjoerdbeentjes force-pushed the feat/ai-internship-filled-cohort branch from 24c49e5 to 0f94ea6 Compare June 10, 2026 15:40
@sjoerdbeentjes sjoerdbeentjes merged commit 472b9fb into main Jun 10, 2026
5 of 6 checks passed
@sjoerdbeentjes sjoerdbeentjes deleted the feat/ai-internship-filled-cohort branch June 10, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants