Commit Graph

3 Commits

Author SHA1 Message Date
DrJKL
6a4cf6023b refactor(website): harden ashby fetcher and tests
Follow-ups to the merged Ashby careers integration (PR #11590).

Type safety
- Add FailureCode discriminant ('missing-env' | 'auth' | 'schema' |
  'network') to FetchOutcome stale/failed variants. Replaces fragile
  reason.startsWith() pattern matching in staleAnnotation() with an
  exhaustive switch.
- Harden isRolesSnapshot() to validate departments[].roles is an array.
- Fix capitalize() so multi-word department names retain title case
  (e.g. "Product Engineering" no longer becomes "Product engineering").
- Simplify extractTitle() to drop redundant 'in' check and one as cast.
- Extract formatZodIssues() helper, used by both envelope and per-job
  parse error paths.

CI reporter
- escapeAnnotation() now escapes % first per GitHub Actions spec.
- describeSnapshotAge() returns 'unknown' for future dates instead of
  collapsing to 'today'.
- Extract MS_PER_DAY constant.

Tests
- Replace 13 inline `as unknown as typeof fetch` casts with a single
  mockFetch() helper.
- Track temp dirs in a Set, clean in afterEach so failed assertions no
  longer leak directories (was 9 inline rmSync calls).
- Add reasonCode assertions across stale/failed cases.
- Add network-error retry test, multi-department grouping test,
  capitalize multi-word test, describeSnapshotAge edge cases (today,
  1 day, n days, NaN, future).
- Add schema and network stale-annotation tests.
- Strengthen 403 test to check status, reason, and reasonCode.
- Fix freshOutcome() helper to derive droppedRoles from droppedCount.
- Tighten tautological careers.spec.ts filter assertion
  (toBeLessThanOrEqual -> toBeLessThan).

Schema
- Document why jobs uses z.unknown() (per-job validation in parseRoles
  for error isolation).

Tests: 30 passing (was 20).
Amp-Thread-ID: https://ampcode.com/threads/T-019dc0d6-da09-7654-b22d-16903e2fee71
Co-authored-by: Amp <amp@ampcode.com>
2026-04-27 12:24:17 -07:00
Christian Byrne
5a8ded7959 Website: pull careers page listing from ashby API (#11590)
Careers

---------

Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
2026-04-24 11:51:43 -07:00
Yourz
bbb043c9cc feat(website): Polish and fix UI (#11363)
## Summary

<!-- One sentence describing what changed and why. -->

Polish and fix UI for new website

## Changes

- **What**: <!-- Core functionality added/modified -->
  - [x] update about video
  - [x] update Moment factory story content
  - [x] update homepage visual
  - [x] update customer story visual
  - [x] put images and videos to bucket

## Review Focus

<!-- Critical design decisions or edge cases that need attention -->

<!-- If this PR fixes an issue, uncomment and update the line below -->
<!-- Fixes #ISSUE_NUMBER -->

## Screenshots (if applicable)

<!-- Add screenshots or video recording to help explain your changes -->

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-11363-feat-website-Polish-and-fix-UI-3466d73d365081f895aff84b594450c9)
by [Unito](https://www.unito.io)

---------

Co-authored-by: DrJKL <DrJKL0424@gmail.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: github-actions <github-actions@github.com>
2026-04-22 18:45:27 -07:00