Home

madison / open-git

public
Code Branches Pull requestsIssuesInsights Campfire Docs
main
Home Code PRsIssues

[UI] A test on a new landing page concept.

open
#105 opened by mosstest/landing→main
Conversation6 Commits4
Files changed
23

4 commits

test landing page.

ca47a58·moss·yesterday

Fix PR Autopilot findings

dfa9317·Open Git PR Autopilot·yesterday

v2

62aeaf1·moss·9 hours ago

Fix observer entry type safety

2626901·Open Git PR Autopilot·9 hours ago

Merge readiness

Ahead4
Behind0
Fast-forwardReady

This pull request can be merged without creating a merge commit.

Checks

Apply migrations to a fresh PostgresPassedAutopilot lifecycle against fresh PostgresPassedBuild webPassedLintPassedSchema drift (db:generate is up to date)PassedTestsPassedTypecheckPasseddrizzle-kit check (snapshot/journal consistency)Passed

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Running Autopilot requires review access on this PR and push access to the source branch.

Latest runsuccess

### What was failing - `Typecheck` failed in `apps/web/app/home/autopilot-trigger-demo.tsx:303` with `TS18048: 'entry' is possibly 'undefined'`. - `Build web` compiled the application but failed during its TypeScript phase on the same error. ### Root cause The `IntersectionObserver` callback destructured the first array item and accessed `entry.isIntersecting` directly. With the repository's strict TypeScript settings, the first observer entry is typed as potentially absent. ### Fix - Updated `useOnScreen` in `apps/web/app/home/autopilot-trigger-demo.tsx` to use `entry?.isIntersecting ?? false`. This safely handles an empty observer-entry array while preserving behavior for normal callbacks. - Verified the targeted check with `npx --yes pnpm@9.15.9 --filter web typecheck`; it passes. - Re-ran the web build. Compilation and TypeScript now pass; local page-data collection proceeds until it reaches the unrelated environment requirement `DATABASE_URL is required` for `/api/campfire/refs`. - Ran `git diff --check`; no whitespace errors were found, and only the intended source file remains modified. Failing checks addressed: `Build web`, `Typecheck` Verification passed and changes were pushed as `26269010166a`. Changed files: ```text apps/web/app/home/autopilot-trigger-demo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ``` Diff preview: ```diff diff --git a/apps/web/app/home/autopilot-trigger-demo.tsx b/apps/web/app/home/autopilot-trigger-demo.tsx index 9c43ea7..da9092f 100644 --- a/apps/web/app/home/autopilot-trigger-demo.tsx +++ b/apps/web/app/home/autopilot-trigger-demo.tsx @@ -300,7 +300,7 @@ function useOnScreen(ref: RefObject<Element | null>) { if (!node) return const observer = new IntersectionObserver( - ([entry]) => setVisible(entry.isIntersecting), + ([entry]) => setVisible(entry?.isIntersecting ?? false), { threshold: 0.35 } ) observer.observe(node) ```