Skip to content

Commit ba521b2

Browse files
committed
Refine method section layout
0 parents  commit ba521b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+11418
-0
lines changed

.astro/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"_variables": {
3+
"lastUpdateCheck": 1772843798000
4+
}
5+
}

.astro/types.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference types="astro/client" />
2+
/// <reference path="content.d.ts" />

.github/workflows/deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- website
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: npm
30+
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v5
33+
with:
34+
enablement: true
35+
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Build site
40+
run: npm run build
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: ./dist
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
needs: build
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
.astro/
3+
dist/
4+
public/paper/psi0-paper.pdf

AGENTS.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# AGENTS.md
2+
3+
## Purpose
4+
5+
This repository hosts the Ψ₀ project website built with Astro and deployed as a static site.
6+
7+
## First places to look
8+
9+
- `README.md`
10+
- `docs/project-page/architecture.md`
11+
- `src/features/project-page/content/projectContent.js`
12+
- `src/features/project-page/content/siteConfig.js`
13+
- `src/features/project-page/ProjectPage.astro`
14+
- `src/features/project-page/project-page.css`
15+
16+
## Working model
17+
18+
- Treat `src/features/project-page/content/projectContent.js` as the primary content/config layer.
19+
- Treat `src/features/project-page/content/siteConfig.js` as the shared layout contract layer.
20+
- Treat `src/features/project-page/components/` as section-level rendering only.
21+
- Treat `src/features/project-page/project-page.css` as the page-specific visual system.
22+
- Keep `src/pages/index.astro` minimal.
23+
24+
## Editing guidance
25+
26+
- Prefer changing content in `src/features/project-page/content/projectContent.js` before editing Astro markup.
27+
- Reuse shared demo card styling instead of adding theme-specific one-off rules unless there is a clear structural reason.
28+
- If demo card geometry needs to change, update `src/features/project-page/content/siteConfig.js` first and keep all themes on the same contract.
29+
- Keep the project name consistent as `Ψ₀` in visible UI text.
30+
- If a figure is referenced on the website, prefer website-friendly image assets in `public/figures/` instead of PDF embeds.
31+
- If a video is referenced on the website, use the optimized files in `public/media/psi-0/`.
32+
- Do not reintroduce the old `option-a/option-b/option-c` page structure.
33+
34+
## Validation
35+
36+
Run these after non-trivial changes:
37+
38+
```bash
39+
npm test
40+
nix develop --command npm run build
41+
```
42+
43+
## Deployment notes
44+
45+
- GitHub Pages deployment is handled by `.github/workflows/deploy.yml`.
46+
- The Astro site is configured for static output in `astro.config.mjs`.
47+
48+
## Repo hygiene
49+
50+
- Large raw paper/media artifacts may exist in the repo root for local work; avoid staging them unless the user explicitly wants them versioned.
51+
- Prefer committing website code and optimized public assets only.
52+
53+
## Demo-specific failure modes
54+
55+
The demo carousel has repeatedly failed in a few predictable ways:
56+
57+
- theme-specific card geometry drift
58+
- portrait clips introducing a different visual rhythm from landscape clips
59+
- copy length causing inconsistent card bottoms
60+
- theme switches failing to recenter the active demo
61+
62+
Prefer solving those at the shared contract level rather than by adding more theme-specific CSS.

README.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Ψ₀ Website
2+
3+
Astro site for the Ψ₀ project page and demo gallery.
4+
5+
## Stack
6+
7+
- Astro 6
8+
- Static site output for GitHub Pages
9+
- Nix flake for local development
10+
- Plain CSS with content-driven Astro components
11+
12+
## Local development
13+
14+
```bash
15+
nix develop
16+
npm install
17+
npm run dev -- --host
18+
```
19+
20+
Astro usually serves the site at `http://localhost:4321`.
21+
22+
## Validation
23+
24+
```bash
25+
npm test
26+
nix develop --command npm run build
27+
```
28+
29+
## Deployment
30+
31+
The repo is configured for GitHub Pages via `.github/workflows/deploy.yml`.
32+
33+
Required GitHub setting:
34+
35+
- `Settings > Pages > Source = GitHub Actions`
36+
37+
To publish under `https://psi-lab.ai/Psi0`, host this code in the
38+
`physical-superintelligence-lab/Psi0` repository and keep the Astro `base` set to
39+
`/Psi0`.
40+
41+
## Project layout
42+
43+
- `src/pages/index.astro`
44+
Single route entry point.
45+
- `src/features/project-page/ProjectPage.astro`
46+
Top-level page composition for the Ψ₀ site.
47+
- `src/features/project-page/components/`
48+
Section components for hero, demos, method, and experiments.
49+
- `src/features/project-page/content/projectContent.js`
50+
Single project-content contract for hero text, demos, method blocks, tables, and asset references.
51+
- `src/features/project-page/content/siteConfig.js`
52+
Shared layout contract and site-level configuration such as demo geometry, footer copy, and TOC entries.
53+
- `src/features/project-page/project-page.css`
54+
Page-specific layout and component styling.
55+
- `src/styles/theme.css`
56+
Global theme tokens and base typography.
57+
- `public/figures/`
58+
Website-ready figure assets derived from the paper.
59+
- `public/media/psi-0/`
60+
Optimized website demo videos.
61+
- `public/paper/psi0-paper.pdf`
62+
Paper PDF exposed by the site.
63+
- `scripts/transcode-media.sh`
64+
ffmpeg-based media optimization helper.
65+
- `tests/project-page/`
66+
Regression tests for content contracts and feature structure.
67+
- `docs/project-page/architecture.md`
68+
Editing guide for the landing page feature module.
69+
70+
## Content editing
71+
72+
Most site edits should start in `src/features/project-page/content/projectContent.js`.
73+
74+
That file exports one `projectPageContent` object with six top-level sections:
75+
76+
- `hero`
77+
- `abstract`
78+
- `demos`
79+
- `method`
80+
- `experiments`
81+
- `footer`
82+
83+
Only edit the Astro components when the layout or interaction model needs to change.
84+
85+
## Reusing this for another project
86+
87+
To adapt this site for another research/project page:
88+
89+
1. Replace the values in `src/features/project-page/content/projectContent.js`.
90+
2. Put your project assets under `public/figures/`, `public/media/<your-project>/`, and `public/paper/`.
91+
3. Update shared layout knobs in `src/features/project-page/content/siteConfig.js` only if the default carousel/page geometry does not fit your content.
92+
4. Run `npm test` to catch missing assets and malformed content.
93+
5. Run `nix develop --command npm run build` before shipping.
94+
95+
The demos carousel is intentionally driven by one shared geometry contract. Avoid per-theme layout overrides unless you are willing to update both CSS and the regression tests.
96+
97+
See [docs/project-page/adoption.md](/home/zhenyu/src/psi0.github.io/docs/project-page/adoption.md) for a field-by-field adoption checklist.
98+
99+
## Failure modes we now guard against
100+
101+
- theme-to-theme demo card drift caused by hidden layout overrides
102+
- demo copy overflowing the shared card geometry
103+
- missing website source/footer configuration
104+
- accidental divergence between benchmark data and rendered table columns
105+
106+
## Notes
107+
108+
- The repo may contain large raw paper/media artifacts that are not part of the deployed site.
109+
- Prefer using the optimized assets under `public/` for website work.
110+
111+
## TODO
112+
113+
- [ ] verify deployed path is /Psi0

astro.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'astro/config';
2+
3+
export default defineConfig({
4+
site: 'https://psi-lab.ai',
5+
base: '/Psi0',
6+
output: 'static'
7+
});

docs/project-page/adoption.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Adopting This Project Page
2+
3+
This page is designed so another research team can reuse it by editing one
4+
content file and replacing public assets.
5+
6+
## What to edit
7+
8+
Edit `src/features/project-page/content/projectContent.js`.
9+
10+
That file exports one `projectPageContent` object with these sections:
11+
12+
- `hero`
13+
Use this for the project title, eyebrow link, authors, affiliations, teaser video, and top-level action links.
14+
- `abstract`
15+
Use this for the abstract kicker/title/body.
16+
- `demos`
17+
Use this for themed demo groups, demo labels, titles, summaries, and video asset paths.
18+
- `method`
19+
Use this for the lead copy, architecture figure, method steps, and the four support blocks.
20+
- `experiments`
21+
Use this for benchmark copy, figure metadata, benchmark table columns/rows, and ablation columns/rows.
22+
- `footer`
23+
Use this for the website source label/link.
24+
25+
## What assets to replace
26+
27+
Put your project assets in `public/` and update the matching paths in
28+
`projectPageContent`.
29+
30+
Typical replacements:
31+
32+
- figures: `public/figures/`
33+
- demo videos: `public/media/<project-slug>/`
34+
- paper PDF: `public/paper/`
35+
- teaser video: `public/media/<project-slug>/`
36+
37+
The tests will fail if referenced public assets do not exist.
38+
39+
## What usually does not need edits
40+
41+
You should not normally need to edit:
42+
43+
- `src/features/project-page/components/*.astro`
44+
- `src/features/project-page/project-page.css`
45+
- `src/pages/index.astro`
46+
47+
Only change those when you want a different layout or interaction model, not
48+
just different project content.
49+
50+
## Shared layout knobs
51+
52+
Edit `src/features/project-page/content/siteConfig.js` if you need to adjust:
53+
54+
- demo card width
55+
- demo media height
56+
- demo copy height
57+
- reel edge inset
58+
- reel gap
59+
- footer copyright
60+
- table-of-contents labels
61+
62+
Keep demo geometry shared across all demo groups. Do not add per-group or
63+
per-demo layout overrides unless you also update tests and CSS intentionally.
64+
65+
## Validation workflow
66+
67+
Run these after content or asset changes:
68+
69+
```bash
70+
npm test
71+
nix develop --command npm run build
72+
```
73+
74+
`npm test` checks:
75+
76+
- content contract shape
77+
- benchmark/ablation column consistency
78+
- presence of referenced public assets
79+
- shared carousel layout contract
80+
81+
## Practical adoption checklist
82+
83+
1. Replace `projectPageContent.hero`.
84+
2. Replace `projectPageContent.abstract`.
85+
3. Replace `projectPageContent.demos.groups` and copy your videos into `public/media/...`.
86+
4. Replace `projectPageContent.method`.
87+
5. Replace `projectPageContent.experiments`.
88+
6. Replace the paper/figure/teaser assets in `public/`.
89+
7. Run `npm test`.
90+
8. Run `nix develop --command npm run build`.

docs/project-page/architecture.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Project Page Structure
2+
3+
The website content for the Ψ₀ landing page is intentionally split into three layers:
4+
5+
1. `src/features/project-page/content/projectContent.js`
6+
This is the single source of truth for the page content contract. It exports one `projectPageContent` object with section-level data for `hero`, `abstract`, `demos`, `method`, `experiments`, and `footer`.
7+
8+
2. `src/features/project-page/content/siteConfig.js`
9+
This holds shared layout and site-level configuration such as demo carousel geometry and footer copy. Use this when the page needs to adapt to another project without rewriting component internals.
10+
11+
3. `src/features/project-page/components/*.astro`
12+
Each major page section renders from the shared data module. Future edits should prefer updating data first, then section markup only if the layout must change.
13+
14+
4. `src/features/project-page/project-page.css`
15+
Shared styling for the landing page. Keep section-specific class names stable so future agents can modify one section without reworking the whole stylesheet.
16+
17+
## Editing guidance
18+
19+
- Prefer editing values inside `projectPageContent` before changing any Astro markup.
20+
- Replace project-specific strings and asset paths inside `projectPageContent.hero`, `projectPageContent.abstract`, `projectPageContent.demos`, `projectPageContent.method`, and `projectPageContent.experiments`.
21+
- Update shared carousel sizing in `src/features/project-page/content/siteConfig.js`, not by adding per-theme geometry overrides.
22+
- Each demo group should keep a stable `slug` for selection state, but demo card geometry should remain shared across themes.
23+
- Keep reusable layout and footer settings in `siteConfig.js`; keep project-specific text and asset references in `projectContent.js`.
24+
- Use `public/figures/`, `public/media/...`, and `public/paper/...` for website assets referenced by the content contract.
25+
26+
## Component map
27+
28+
- `HeroSection.astro`: renders `projectPageContent.hero`.
29+
- `AbstractSection.astro`: renders `projectPageContent.abstract`.
30+
- `DemosSection.astro`: renders `projectPageContent.demos`.
31+
- `MethodSection.astro`: renders `projectPageContent.method`.
32+
- `ExperimentsSection.astro`: renders `projectPageContent.experiments`.
33+
- `ProjectPage.astro`: top-level composition plus wide-screen table of contents and footer.
34+
35+
## Validation
36+
37+
- Run `npm test` for content-shape checks and public-asset existence checks.
38+
- Run `nix develop --command npm run build` to verify the full Astro build.
39+
- See `docs/project-page/adoption.md` for the reuse workflow aimed at other researchers.

0 commit comments

Comments
 (0)