Skip to content

refactor: unify internal imports under @app alias - #9

Merged
thinkclay merged 1 commit into
mainfrom
codex/refactor-import-naming-conventions-to-@app
Sep 22, 2025
Merged

thinkclay merged 1 commit into
mainfrom
codex/refactor-import-naming-conventions-to-@app

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Summary

  • replace the former @my/*, app/*, and ui/* path aliases with a single @app/* mapping and rename the internal workspaces to @app/api, @app/ui, and @app/supabase
  • update Next, Expo, and Storybook configs plus the root docs to consume the new alias and workspace names
  • refresh generator templates and TypeScript project includes so Supabase types remain discoverable under the new alias

Testing

  • yarn check:type (fails: pre-existing type errors surfaced during project build)

https://chatgpt.com/codex/tasks/task_b_68d1b92def74833189cb9bd0a09f0fac

@thinkclay
thinkclay merged commit c18e827 into main Sep 22, 2025
@thinkclay
thinkclay deleted the codex/refactor-import-naming-conventions-to-@app branch September 22, 2025 22:11
thinkclay added a commit that referenced this pull request Nov 18, 2025
- Enhance useIPIPResults hook with detailed error tracking
- Add separate error states for scoring, normalization, and narrative loading
- Implement graceful degradation for partial results
- Add retry mechanisms in IPIPResultsPage and IPIPAssessmentWizard
- Display partial results even when some data processing fails
- Show data quality warnings when errors occur but results are available
- Add fallback calculations for chart data when normalization fails
- Improve error messages with actionable retry options
- Handle edge cases: missing narratives, scoring failures, network errors

Task: REQ-227 #9
thinkclay added a commit that referenced this pull request May 1, 2026
Workflows #6, #8, #9 all completed PREBUILD cleanly (submodules
hydrated via pre-install hook, expo doctor passed) but then the build
pipeline short-circuited at RESTORE_CACHE without running INSTALL_PODS,
BUNDLE_JAVASCRIPT, or RUN_FASTLANE. Generic 'Unknown error. See logs
of the Restore cache build phase' with no actual phase output.

The cache.customPaths setting points at 'node_modules' (resolved to
apps/scaffald/node_modules) which doesn't exist — pnpm's workspace
hoisting puts node_modules at the repo root. A non-existent custom
cache path may be confusing EAS's pipeline state machine.

Removing the cache block to use EAS defaults. Builds will be slower
on subsequent runs without warm cache, but correctness > speed for
the first-ever production build.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
thinkclay added a commit that referenced this pull request Jun 23, 2026
The mutate.mjs PLAN used to close the v1.12.0 epics to Done after their PRs
merged (#358–#362 + Scaffald/sdk #8/#9 + migration 335). Kept as the audit
trail, consistent with prior PLAN snapshots.

Co-authored-by: Claude Opus 4.8 <[email protected]>
thinkclay added a commit that referenced this pull request Aug 19, 2026
Phase 3, screen 1 of the prototype-parity plan (#622). Closes five items from
§12 of the ATS design brief in one screen.

LANES — the pipeline as stage-grouped, full-width rows, now the default view
with Board and Metrics alongside. Seven columns already overflow a laptop and
the recruiter and NationSearch flows have eleven and twelve, so the board's
answer to "more stages" is sideways scrolling that hides work. Rows also have
room for the columns a card cannot carry. This answers open question #1 in the
ATS brief.

DAYS IN STAGE (§12 #7) — the board showed days since *applied*, which is a
different and much less useful number: a candidate who applied 30 days ago and
moved to Interview yesterday is not stale, and one who applied 8 days ago and
has sat untouched in New is. `stage-timing.ts` derives the real figure from
`stageHistory` — the transitions recorded in core.application_activity — by
taking the most recent entry into the current status, so a candidate moved
backwards gets a fresh clock. No history means the candidate has never moved,
and their clock starts at appliedAt, which is correct rather than a fallback:
entering the pipeline IS their entry into `new`.

It returns null rather than 0 when timestamps do not parse, and clamps future
timestamps to now — local Supabase has been observed running behind the host
clock, which would otherwise render as "-2d in stage".

Overdue is per-stage against the promises the public transparency stats are
computed from, and every overdue row carries a reason ("Overdue — screening
decision"), because an amber number alone says something is wrong without
saying what. Terminal stages are never overdue: nobody is waiting on a hired
candidate.

ALSO CLOSED
  §12 #8   score, source, union status and assignee are on every row — these
           are the reasons an employer picks one candidate over another and
           none of them were on a card
  §12 #9   each stage gets its own empty state saying what would fill it,
           instead of "No applications" seven times
  §12 #17  Withdrawn reads as "Withdrawn by candidate" rather than a grey pill
           in a red column — the conflation the data model works to prevent
  §12 #6   the Interview column was error[50], the same red as rejected, so
           advancing a candidate moved them into a column that reads as a
           warning. It is a progress stage and now tints with the primary ramp

Rows sort stalest-first within each stage, so the row that most needs acting
on is the one at the top.

TEST SEAM — scf-core resolves @scaffald/ui to a mock, so the four new
primitives are added there. They mirror the real contracts rather than being
stubbed: LaneGroup honours count/emptyState and Lane renders age first, since
a stub that dropped those would make the screen logic under test unobservable.
The change is additive — 171 insertions, zero deletions — so no existing
consumer is affected.

Verified: typecheck clean on scf-core and scaffald-app; lint clean; 17 new
stage-timing tests and 11 new Lanes tests, all passing; an existing mock
consumer (TeamMembersList) still passes.

Not verified: the screen has not been seen rendering — it is behind auth and
the office role. Note also that the full scf-core suite cannot be run locally:
an unfiltered vitest run OOMs the worker, which is why prepush excludes it.

Co-Authored-By: Claude Opus 5 <[email protected]>
thinkclay added a commit that referenced this pull request Aug 20, 2026
…n primitives (#621)

* feat(redesign): phase 1 tokens, prototype reference shots, and the parity plan

Applies the SCF prototype (~/Development/SCF-Prototype) to the app. This is
Phase 0 + Phase 1 of docs/plans/redesign/2026-08-19-prototype-parity-plan.md.

PHASE 0 — the reference. 58 screenshots of the prototype, 29 screens across
five roles at desktop 1440x900 and mobile 390x844, captured by driving the
prototype's own state (capture-prototype.mjs re-runs it when the prototype
moves). The plan doc records what the prototype decides that we have not,
and measures the audit's findings against our code: 699 literal fontSize
sites across 15 values, ~350 literal borderRadius across a dozen, 392 raw
hex across 57 files, three separate page-header components.

PHASE 1 — tokens, in the @scaffald/ui submodule (see its own commit). Teal
stays the one primary; amber becomes the reserved attention role.

App-side changes here:

- global.css declares 'Scaffald Display' for headings, with a Georgia
  fallback so the serif intent survives until the Cormorant WOFF2 lands.
  The family name is indirect so swapping the display face later is a change
  to two rules rather than to every component.

- login-screen.tsx: the title hard-coded `fontFamily: 'RobotoSerif_400Regular'`
  in an inline style, which overrode getFontFamily entirely and pinned the
  screen to the body serif — the token system could never reach it. Removed.
  It was also an H5 used as a card title; H5 is now the body-size step, so
  this is an H4, which preserves the shipped 17px exactly.

Verified: typecheck clean across @scaffald/ui, scf-core and scaffald-app;
UI suite 634/655, identical to the pre-change baseline; auth feature tests
44/46 with 0 failures; lint clean; computed styles and both themes confirmed
in the browser on a cold Metro cache.

Not included: the Cormorant Garamond WOFF2 files (downloading them needs
sign-off), and the prototype push to Scaffald/Prototype@main.

Co-Authored-By: Claude Opus 5 <[email protected]>

* feat(fonts): self-host Cormorant Garamond as the display face

Completes Phase 1. Headings now render in the prototype's actual face on web
rather than falling back to Georgia.

Cormorant Garamond is a variable font, so one 37 KB WOFF2 covers the whole
weight axis — Google serves the same file for its 400 and 600 faces, which is
why this is one file and not the two the plan assumed.

The fallback moved to its own family name ('Scaffald Display Fallback') and
into the stack that getFontFamily emits. Declared as a second @font-face under
the same family it shadowed the real font entirely: the browser matched it and
never requested the WOFF2, so headings rendered as Georgia while still looking
serif in a screenshot. It keeps `size-adjust: 92%` to stop headings jumping
size during the swap.

Native is unchanged and still on Roboto — see getFontFamily for why.

Verified: font served 200 (37776 bytes), document.fonts.check true, and
Cormorant measures 119.9px against the fallback's 125.23px for the same
string, confirming the real face is what loaded. Typecheck clean across all
three packages; UI suite 634/655, identical to baseline.

Co-Authored-By: Claude Opus 5 <[email protected]>

* feat(redesign): phase 2 primitives, first caller, and two plan corrections

Picks up the four screen primitives from the @scaffald/ui submodule (see its
own commit) and proves them on one screen.

MIGRATED — the ATS applications screen now uses ScreenHeader + ListToolbar.
It gains the kicker and the tip the prototype gives it, a collapse caret, and
moves its count out of an ad-hoc subtitle ("14 total applications") into the
toolbar's result slot, which owns the one "{n} {noun}" template. This is the
only screen migrated so far — the plan warns that a mechanical sweep produces
a diff nobody can review, so the rest go per-screen in phase 3.

DELETED — features/office/components/OfficePageHeader.tsx, which had zero
callers. SaaSSectionHeader is also unused by the app but stays: it is a
published export of the component library with stories and a docs page, so
removing it is an API decision rather than dead-code cleanup.

TWO CORRECTIONS to the plan, both from checking rather than assuming:

1. The prototype push is unnecessary. github.md's sync note claims
   Scaffald/Prototype@main still holds the 13 Aug build against 677 KB
   locally, and I repeated that as the one item with a real bus factor. After
   a fetch, local main and origin/main are the same commit and the file is
   772,808 bytes on both. The note is stale; the reference was never
   laptop-only.

2. "Three competing page headers" overstated it. Two of the three are dead,
   and the third is a toolbar, not a header. Recorded in the ui commit.

Verified: typecheck clean across all three packages; lint clean; UI suite 670
tests / 649 passing / the same 21 pre-existing environment failures.

NOT verified: the migrated ATS screen has not been seen rendering. It sits
behind auth and the office role, and reaching it means authenticating — which
I do not do. The dev server is up on :8087 if you want to look.

Co-Authored-By: Claude Opus 5 <[email protected]>

* feat(ats): Lanes view for the pipeline, and a real days-in-stage clock

Phase 3, screen 1 of the prototype-parity plan (#622). Closes five items from
§12 of the ATS design brief in one screen.

LANES — the pipeline as stage-grouped, full-width rows, now the default view
with Board and Metrics alongside. Seven columns already overflow a laptop and
the recruiter and NationSearch flows have eleven and twelve, so the board's
answer to "more stages" is sideways scrolling that hides work. Rows also have
room for the columns a card cannot carry. This answers open question #1 in the
ATS brief.

DAYS IN STAGE (§12 #7) — the board showed days since *applied*, which is a
different and much less useful number: a candidate who applied 30 days ago and
moved to Interview yesterday is not stale, and one who applied 8 days ago and
has sat untouched in New is. `stage-timing.ts` derives the real figure from
`stageHistory` — the transitions recorded in core.application_activity — by
taking the most recent entry into the current status, so a candidate moved
backwards gets a fresh clock. No history means the candidate has never moved,
and their clock starts at appliedAt, which is correct rather than a fallback:
entering the pipeline IS their entry into `new`.

It returns null rather than 0 when timestamps do not parse, and clamps future
timestamps to now — local Supabase has been observed running behind the host
clock, which would otherwise render as "-2d in stage".

Overdue is per-stage against the promises the public transparency stats are
computed from, and every overdue row carries a reason ("Overdue — screening
decision"), because an amber number alone says something is wrong without
saying what. Terminal stages are never overdue: nobody is waiting on a hired
candidate.

ALSO CLOSED
  §12 #8   score, source, union status and assignee are on every row — these
           are the reasons an employer picks one candidate over another and
           none of them were on a card
  §12 #9   each stage gets its own empty state saying what would fill it,
           instead of "No applications" seven times
  §12 #17  Withdrawn reads as "Withdrawn by candidate" rather than a grey pill
           in a red column — the conflation the data model works to prevent
  §12 #6   the Interview column was error[50], the same red as rejected, so
           advancing a candidate moved them into a column that reads as a
           warning. It is a progress stage and now tints with the primary ramp

Rows sort stalest-first within each stage, so the row that most needs acting
on is the one at the top.

TEST SEAM — scf-core resolves @scaffald/ui to a mock, so the four new
primitives are added there. They mirror the real contracts rather than being
stubbed: LaneGroup honours count/emptyState and Lane renders age first, since
a stub that dropped those would make the screen logic under test unobservable.
The change is additive — 171 insertions, zero deletions — so no existing
consumer is affected.

Verified: typecheck clean on scf-core and scaffald-app; lint clean; 17 new
stage-timing tests and 11 new Lanes tests, all passing; an existing mock
consumer (TeamMembersList) still passes.

Not verified: the screen has not been seen rendering — it is behind auth and
the office role. Note also that the full scf-core suite cannot be run locally:
an unfiltered vitest run OOMs the worker, which is why prepush excludes it.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(ats): segmented control for the view switch, not three Buttons

Picks up the layout fixes from the @scaffald/ui submodule and fixes the same
inversion on the app side.

The view switch gave the ACTIVE view `variant="outline"` and left the other
two on the default filled variant — so Board and Metrics rendered as the
primary action while the view you were actually on looked disabled. It reads
as a segmented control now, which is what the prototype uses and what the
control is for.

It carries an explicit width: SegmentedControl's segments are `flex: 1` inside
a container with no intrinsic width, so left to the header row it collapsed to
160px and clipped "Metrics" to "Metr…". Worth fixing centrally later — noted
rather than done here, because the component has other callers and there is
currently no automated gate that would catch a regression in them (#375, #469).

Found by rendering the primitives in Storybook, which needs no auth and so is
the first look any of this work has had at a real browser.

Verified: typecheck clean across all three packages; lint clean; Lanes tests
11/11; UI suite 649/670 with the same 21 pre-existing failures.

Co-Authored-By: Claude Opus 5 <[email protected]>

* chore(ui): point the submodule at merged main (Scaffald/ui#18)

The branch pointer would have referenced a commit that only exists on
redesign/phase1-tokens; the squash merge rewrote it. This points at
8b27d54 on origin/main so a fresh clone can resolve the submodule.

Typecheck clean across all three packages against the merged pointer.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
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.

1 participant