Skip to content

Fix Pages deploy: split upload and deploy into separate jobs - #47

Merged
Justin83 merged 99 commits into
mainfrom
claude/freshwater-ecology-portal-foig0o
Nov 15, 2026
Merged

Justin83 merged 99 commits into
mainfrom
claude/freshwater-ecology-portal-foig0o

Conversation

@Justin83

Copy link
Copy Markdown
Owner

What changes

The site deploy for #46 (18c261f) failed twice, so nothing since November 11 has gone live. The live site still serves the November 11 build, and nothing on it is broken.

The failure: in run 43775697030, the upload step succeeded (Artifact ID is 14186197074), but deploy-pages ran about 0.3 s later in the same job and found nothing:

Fetching artifact metadata for "github-pages" in this workflow run
Found 0 artifact(s)
Error: No artifacts named "github-pages" were found for this workflow run.

The re-run failed the same way.

Why it's not the content: the workflow is unchanged since the November 11 deploy, which logged Found 1 artifact(s). Both runs used the same actions and versions, with the same Node 24 warning. githubstatus.com shows no incident.

The cause: this is the known listing race when upload-pages-artifact and deploy-pages share one job (actions/deploy-pages#451). Re-running the same run can't fix it, because it would then find two artifacts.

The fix (.github/workflows/pages.yml):

  • a build job (checkout, configure-pages, upload-pages-artifact);
  • a separate deploy job (needs: build, environment github-pages, deploy-pages).

This matches GitHub's Pages starter workflow. The actions, versions, permissions, concurrency group and site content are all unchanged.

Testing


Generated by Claude Code

claude added 30 commits November 5, 2026 00:07
Page hierarchy, component architecture, data model, visual design plan,
reusable pieces and phased sequence, written against the static Pages site
as it exists. Includes a draft Phase 4 SQL schema that is not applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
… chapters

Seed data (resources with link checks, Crossref-verified references, glossary,
organism atlas, Allen Branch site record, map-layer provenance, research
questions), the in-place page generator and link checker, portal CSS/JS,
vendored Leaflet 1.9.4, the research home page, the cyanobacteria unit
overview and Chapters 1-2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Adds the remaining portal pages: cyanobacteria Chapters 3-10 (5 and 10 in
full, the rest as reviewed outlines with a watershed nutrient-pathways
figure), Learn hub and glossary, Watersheds & Maps with live USGS/KGS/
KyGovMaps layers and layer provenance, the Allen Branch profile with
evidence-labeled facts and investigation checklist, site inventory,
Organism Atlas with comparison tool, Field Methods, Observations,
Research Projects, Resource Library and Research Paper Library with
filters, Standards, and portal search. Adds a read-only DOI verifier and
operations/verification docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Adds a Research link and card on the homepage, a card on the Math & Natural
Sciences page, and a README section. No other site content changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Use the Kentucky 911 Site Structure Address Point for Somerset Community
College's main-campus address (Pulaski County 911 record) as the center of
the home preview, Maps page and Allen Branch maps, zooming so the whole
mapped Allen Branch line fits around it. Adds a labeled campus marker,
0.5/1/2 km distance circles, and a Campus re-center control. Records the
268 m difference from the Census street-range estimate, the ~250 m
straight-line distance to the mapped stream, and the NHD springs, sinks and
underground conduits mapped near campus (none on Allen Branch itself).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Short page titles were read from HTML (already entity-encoded) and escaped
again, so breadcrumbs on four pages showed "Watersheds &amp;amp; Maps".
Decode entities when reading titles, regenerate the four pages, and make
the build check fail on any "&amp;amp;" in generated output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Links that leave Biology at SCC (agencies, journals, map tools, DOIs) now
open in a new tab with rel="noopener", so visitors keep their place on the
lab site. Internal links and mailto: links are unchanged.

- The portal generator writes target="_blank" on every external link and
  tells screen-reader users the link opens in a new tab; build --check now
  fails on any external link without it.
- One-time update of hand-written external links in portal pages and the
  Honors Symposium page; the Leaflet attribution link too.
- A small decorative arrow marks new-tab links (site stylesheet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
- Road maps: Kentucky Commonwealth Map street base map (KyGovMaps), USGS
  imagery with roads and labels, and a transparent USGS highways-and-roads
  overlay with route shields, each with provenance in the layer panel.
- KGS bedrock geology overlay (1:24,000 geologic quadrangle data) and the
  KGS dye-trace / karst groundwater basin layer.
- Allen Branch profile: dye-traced karst connections fact (none on Allen
  Branch; nearest traces ~1-2 km away), geology fact cites USGS geologic
  quadrangle maps GQ-909 (Delmer) and GQ-1196 (Somerset); karst checklist
  updated.
- Resource Library: KGS card now points to https://kygs.uky.edu/ (old
  address failed TLS checks); adds KGS Data & Downloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Every portal map gets an "Open in Google Maps" control that opens the
current view (center and zoom) in Google Maps in a new tab, via Google's
documented Maps URLs, for business listings, hours and Street View. Google
tiles are not embedded: their terms allow that only through the paid APIs.

Adds OpenStreetMap standard tiles as a base map (streets, named businesses
and places) with the required linked attribution; its limitations note that
business coverage in Somerset is partial.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…QR codes and faculty review

Students can submit a field observation from a phone at
research/freshwater/observations/submit/, attaching up to six photos.

- The form reads each photo's time, GPS position and camera on the phone (exifr 7.1.3,
  MIT, vendored), then re-saves the photo through a canvas: upright, at most 1600 px and
  700 KB, plus a 400 px thumbnail, with no embedded metadata.
- When a photo has no GPS (common when phones share photos with websites), the student
  can use "Use my current location", a map pin, or typed coordinates.
- Drafts are kept on the device, the class code is read from a QR scan, and an
  interrupted upload can be resumed.

Faculty review page (observations/review/, noindex, instructor key required):
- approve, request changes or reject entries;
- remove photos (faces, plates, homes);
- open or close submissions;
- set the class code and print a class QR that fills the code in (qrcode-generator
  1.4.4, MIT);
- export entries.

Public pages show approved entries only:
- the Observations page, compact cards on Allen Branch and the home page, and
  photo popups on the map's observation layer;
- names only where the student opted in; no review notes, per-photo GPS or camera.

A static QR code for the form (assets/qr-submit.svg, made by make-qr.mjs) appears on the
form and on the Observations, Allen Branch, Methods and home pages.

Database: research/freshwater/sql/001_field_submissions.sql.
- A private schema reached only through SECURITY DEFINER functions.
- bcrypt-hashed class code and instructor key.
- A 2-hour upload token, and a 150 MB photo quota for the free tier.
- NOT applied to Supabase. enabled is false in assets/fieldobs.js, so the live site
  runs the form in practice mode and sends nothing.

Tests (local stand-in database only):
- tools/freshwater-portal/local-api.mjs (PGlite);
- 6 database contract tests;
- a Playwright end-to-end test with a synthetic EXIF photo;
- QR codes decoded with jsQR;
- axe: 0 violations on all 27 pages and on the new interactive states, light and dark,
  desktop and phone.

Docs: docs/freshwater-portal/FIELD_SUBMISSIONS.md (how it works, privacy, storage,
go-live steps that need approval); VERIFICATION.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…logy-portal-foig0o

# Conflicts:
#	research/freshwater/assets/portal.css
#	research/freshwater/data/search-index.json
… QR, officer tools

New section at math-science-club/ for anyone in the club:
- Club home: the next meeting, with a check that it falls on the usual third Thursday
  (November 19, 2026 does), and the Fall 2026 schedule grouped by month, transcribed
  from the printed "MSSE Scholars Proposed Activities" flyer (17 events, three
  tentative), with earlier events collapsed. The logo is a placeholder
  (assets/logo.svg).
- Food sign-up (signup/, the QR target): see who is bringing what by category, add your
  name, item and an allergy note from any phone or computer, no account needed. The
  device that signed up can change or remove its own entry (private token in
  localStorage).
- Officer tools (officers/, noindex): reached through a clearly marked "officers only"
  box and protected by an officer code. Officers can edit dates and times, add, cancel
  or delete events, set up each event's food categories and how many of each are
  needed, remove sign-ups, open or close sign-up, and change the code.
- Printable QR poster (qr/); QR codes for the sign-up page and club page come from
  tools/math-science-club/make-qr.mjs.
- Club card and nav link on the site home page and the Math & Natural Sciences
  department page.

Database: math-science-club/sql/001_club.sql.
- A private club schema reached only through SECURITY DEFINER public.club_* functions.
- The officer code is stored as a bcrypt hash.
- Sign-ups are limited per event, duplicates are refused, and sign-up is refused for
  past events.
- The seed matches data/events.json, which the page shows if the database is off or
  unreachable.

Tests:
- tools/math-science-club/local-api.mjs (PGlite stand-in database);
- 7 database contract tests;
- a browser end-to-end test (two phones and an officer);
- tools/math-science-club/check.mjs;
- axe on 10 page states, light and dark, desktop and phone: 0 violations.

Also: the [hidden] attribute now always hides elements in the portal and club
stylesheets. Without this, buttons with display rules stayed visible, such as the
freshwater form's "Add another person" button at 8 observers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Both databases are live in the SyllaBased Supabase project, applied 2026-11-05 with
Justin's approval: migrations fieldobs_v1 and club_v1. The instructor key and officer code
are stored only as bcrypt hashes and are not in this repository.

- assets/fieldobs.js and math-science-club/assets/club.js: enabled = true. Student field
  observations stay closed until faculty save a class code and open submissions on the
  review page. Club food sign-up is open, and the November 19 meeting and December 3
  holiday party are set up for it.
- Club logos, redrawn as vector images from the shared screenshots with the site's green
  background in place of navy. Gold and icon colors are kept, and the lettering is
  outlined in the open-licensed fonts Bebas Neue, Josefin Sans and Cinzel.
  - The shield logo (now the site logo), the circular seal, and a combined seal.
  - Generated by tools/math-science-club/make-logos.mjs.
- The club is named "Math & Science Club" on the pages, matching its logo and the Fall
  2026 flyer.
- The club test now checks the database-unreachable fallback by blocking database
  requests, since ?api=off reaches production now that the club is enabled.
- Docs: docs/math-science-club/README.md (members, officers, logos, data, testing,
  go-live record); FIELD_SUBMISSIONS.md and VERIFICATION.md record the production
  checks.

Production checks:
- every public function was called through the REST API with the publishable key;
- wrong codes and keys are refused;
- the private schemas are not exposed;
- a club sign-up was added, changed and removed with its token;
- the field-observation submit → photo → finish → approve flow ran inside a transaction
  that was rolled back, leaving no test data;
- the pages were loaded against production with no errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Justin chose the combined design: the club shield and its six colored icons inside the
seal, on the site's green. math-science-club/assets/logo.svg is now a copy of
assets/logos/seal-combined.svg, so every club page and the QR poster show it. The alt text
now matches the seal's wording, and the docs record the choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
# Conflicts:
#	docs/math-science-club/README.md
#	math-science-club/assets/logo.svg
#	math-science-club/index.html
#	math-science-club/qr/index.html
…py sweep

Requested by Justin:
- Events are cards, grouped by month. Food events have a "Sign up to bring food" button
  that opens the sign-up in a pop-up (assets/signup-form.js, shared with the QR sign-up
  page).
- The landing page puts the next meeting and its sign-up button first, next to a QR code
  with "Show on the big screen", which fills the screen with the QR for students to scan
  in class.
- Food theme per event ("Pasta", "Tacos"), shown on cards and in the sign-up. Blank shows
  "to be announced". Officers set it in the editor. Database migration club_v2
  (math-science-club/sql/002_club_theme.sql); the local stand-in applies every migration
  in order.
- The paper plates, cups and napkins category is dropped from the seeded events and from
  "Use the usual categories".
- The officer editor opens in a pop-up: two columns on a desktop, full screen on a phone.
- Copy sweep: no em dashes in the club section, plainer wording, no overselling. Logo
  titles were regenerated without dashes.

Tests: 7/7 contract tests and a rewritten browser end-to-end test, which covers:
- cards and the pop-up sign-up from two phones;
- the officer editor setting a theme and a "how many";
- the big-screen QR;
- the fallback when the database can't be reached.

axe: 0 violations in 36 page and pop-up states, light and dark, desktop and phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…logy-portal-foig0o

# Conflicts:
#	math-science-club/assets/logo.svg
The pop-up on the club home page used the schedule loaded with the page. Sign-ups other
people made afterwards were missing (for example, on a page left open on a classroom
screen), which could lead to duplicate dishes. Now it fetches the schedule first. If the
event's sign-up has since closed, it shows a note instead of opening.

The browser test now checks this: student A's page loads before student B signs up, and
A's pop-up must then show B's entry. The new step fails against the previous code and
passes with this change.

Reported by the Codex review on #17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…t layout

- The small dropdown that quietly preselected the next meeting is replaced by a required
  step 1, "Choose the get-together": one large card per event with sign-up open, showing
  the date, time, food theme and how many have signed up.
- Nothing is preselected, and the sign-up form (step 2) appears only after a choice. A
  link that names its event (?event=, used by the buttons on the club page cards) still
  preselects it. The choice is kept in the address, so a reload or a shared link keeps
  it.
- Fixed the "Who's bringing what" counts running into the category names on this page
  ("Main dish nobody yet"). The count style only covered the pop-up's heading level.

The browser test checks:
- nothing is preselected, and the form stays hidden until a choice is made;
- a link that names its event preselects it.

axe: 40/40 states with 0 violations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…logy-portal-foig0o

# Conflicts:
#	docs/math-science-club/README.md
#	math-science-club/assets/club.css
#	math-science-club/assets/signup.js
#	tools/math-science-club/tests/club-pages.e2e.mjs
After someone signed up, the list below updated but the chosen card in step 1 still
showed the old count (for example "nobody signed up yet") until the page was reloaded.
The counts now update whenever the sign-up list refreshes. Only the text changes, so the
selected card and keyboard focus stay put.

The browser test now checks that after student B signs up, the card shows the new count
and stays selected. It fails against the previous code and passes with this change.

Reported by the Codex review on #18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…the club website

- Departments: removed the nav link from every page (site pages, club pages, and the
  freshwater portal header via build.mjs), the Departments section on the site home
  page, and the department pages (departments/: hub, Math & Natural Sciences, Nursing).
  The home intro and description no longer mention departments, and the README matches.
  Agency names in the freshwater content (Kentucky Department of Fish & Wildlife
  Resources, Department for Public Health) are unchanged.
- Club: an "Officer tools" button sits in the club bar at the top of every club page; the
  officer box at the bottom of the landing page is gone.
- Club landing page: the QR code and the "Show on the big screen" view now open the club
  website (assets/qr-club.svg) instead of the food sign-up. The big screen shows the next
  meeting. The sign-up page and the printable poster keep the sign-up QR.

Checks:
- build.mjs --check: 27 portal pages;
- club check.mjs passes;
- 0 broken links on the 9 main-site pages;
- the club browser test, with new checks for the officer button and the website QR;
- axe: 0 violations on the club home, officer tools and site home pages, light and dark,
  desktop and phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…logy-portal-foig0o

# Conflicts:
#	math-science-club/assets/club.css
Justin asked for the line under the club title to go. The next-meeting card below it
still gives the date, the time and the third-Thursday check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…day wording

- Poster now shows a single QR code that opens the club website; people reach the
  food sign-up from there. Removed qr-signup.svg and signupUrl; make-qr.mjs writes
  only qr-club.svg.
- Removed the "Share this sign-up" QR card from the sign-up page.
- Removed the remaining third-Thursday wording: the poster line, the next-meeting
  check chip on the club home, the site home club card and the meta description.
- e2e: asserts no QR on the sign-up page, one club-website QR on the poster, and no
  third-Thursday text. Docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
docs/bio151-mitosis-lab/PLAN.md records Justin's decisions of 2026-11-10: dedicated
mitosislab tables (no reuse of livelab, chlorophyll records untouched); no PINs or groups;
First and Last Name (replacing initials); a device editing token stored only as a hash,
required for edits, names never authorize; duplicate names allowed; a minimal student
form (names, two 25-cell tables, live totals, Save); a public dashboard of aggregates
with no names or IDs in the page or API; database-side authorization and validation; a
separate instructor dashboard (names, counts, completion, mitotic indices, last saved,
edit, recover access, named CSV, open/close); one experiment per semester. Also the
data model, functions, token lifecycle, pages, calculations, security checklist, tests,
delivery steps and open questions. TODO.md links it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…shboard

Built to docs/bio151-mitosis-lab/PLAN.md (Justin's decisions of 2026-11-10).

- Database (labs/bio151-mitosis/sql/001_mitosis.sql, migration mitosis_v1): a private
  mitosislab schema with experiments, submissions, stage_counts, settings and audit. RLS
  is on with no policies or grants, and access is only through six SECURITY DEFINER
  functions. livelab (spectrophotometry, incl. Fall 2026 chlorophyll) is untouched.
- Students: required first and last name, two 25-cell counting tables with live totals,
  and Save. No PINs or groups. The first save returns a 256-bit editing token once; only
  its sha256 is stored and the device keeps the token. Later edits need it; names never
  authorize, and duplicate names are separate submissions. Validation is in the database.
- Public dashboard: class totals, the class mitotic index and a dot plot of individual
  indices. No names, IDs or per-student times in the page or any public response.
- Instructor (separate key): names, counts, completion, mitotic indices and last saved;
  edit (audited, works while closed), recover access (rotates the token; one-time link
  and QR, token in the URL fragment), delete, open/close, named CSV, settings, a new
  semester, and the key.
- One experiment per semester; Fall 2026 is bio151-mitosis-2026fa.
- Tests: 7 database contract tests (tools/bio151-mitosis/local-api.mjs, PGlite) and a
  Playwright e2e covering the student flow, duplicate names, no names in public
  responses, the roster, correction, recovery, CSV, close and delete. axe finds no
  violations on any page (phone/desktop, light/dark).
- Labs page card, QR codes (tools/bio151-mitosis/make-qr.mjs), README, TODO.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…logy-portal-foig0o

# Conflicts:
#	TODO.md
#	docs/bio151-mitosis-lab/PLAN.md
- Counting tables: the input and click handlers are assigned to the container rather than
  added, so rebuilding the tables in the instructor's edit dialog replaces them. Before,
  each opening stacked another click handler and one click of − or + changed a count by
  the number of openings (reproduced: 4 openings, 20 became 16).
- Classroom QR: when the dashboard shows another semester (?exp=), the QR sends students
  to that semester.
- Student form: if the student keeps typing while a save is in flight, the newer values
  are kept and marked "newer changes not saved yet" instead of being replaced by what
  was sent.
- e2e covers all three (repeated editor openings, ?exp= QR, a delayed save).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
- Student form, return visit: the form and Save stay hidden until the saved submission has
  been restored, and Save is refused while booting. Before, a slow restore could overwrite
  counts typed in the meantime, and pressing Save in that window could replace the saved
  submission with an empty form. The e2e delays mitosis_get_own and checks the form waits
  (it fails on the old code: the form showed early).
- update_experiment takes the experiment row lock (the same one mitosis_save holds) before
  checking for submissions, so a first save still in flight is seen and the layout can't
  change under it. Reproduced on PostgreSQL 16 with two sessions: before, the layout
  changed while a save was in flight (1 submission, regions x1,x2); after, the change
  returns has_submissions and the layout stays r1,r2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…r while saving

- Student form: if a returning device can't load its saved counts (network or
  server error), the form and Save stay hidden and a "Try again" button reloads,
  so a blank form can never overwrite the real submission. "Start a new
  submission" is ignored while a save is in flight.
- Instructor editor: while a correction or delete is on its way, every input and
  button in the dialog is disabled, so nothing typed after Save is discarded when
  the dialog closes. Recover access runs once per click.
- e2e: a 503 on the restore keeps the form closed and Try again recovers it; the
  editor is locked during a slow save. Both tests fail on the previous code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…w submission

If the server can't be reached when a recovery link is opened, the page now keeps
the form closed and shows Try again. The link's credentials stay with this tab
only (memory and sessionStorage, never the address bar or localStorage), so Try
again or a reload completes the recovery; they are cleared once it works or the
link proves invalid. Try again re-runs the page start-up instead of reloading, and
a failed lab lookup also offers it.

e2e: a 503 on the recovery keeps the form closed, Try again while still failing
keeps it closed, and a reload after the server is back finishes the recovery.
The test fails on the previous code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Each opening of the edit or recover-access dialog is now its own session. A
reply that returns after its dialog was closed, or reopened for another
student, never touches the dialog on screen: a recovery link made for one
student can't appear in another student's dialog (it is withheld, with a note
to make a new one), and a finished save or delete can't close or unlock a
different student's editor. While a request is on its way, Esc and the close
buttons can't close the dialog. Messages name the student captured when the
request started.

e2e: Esc is refused mid-request; a slow save for one student leaves the second
student's open editor untouched; a slow recovery for one student never shows
its link in the second student's dialog. Delayed test routes now share a
helper that tolerates being unrouted mid-delay (the cause of a flaky run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
If a first save reached the database but its answer was lost, saving again
used to insert a second submission: the first became uneditable but still
counted in the class totals. Now the device makes the 256-bit editing token
(crypto.getRandomValues) and keeps it until the save is confirmed (localStorage,
memory if blocked). mitosis_save takes it as p_token: the same token with the
same names (case-insensitive) continues that submission; the same token with
other names (another student on a shared device) gets a new submission with a
database-made token, so one student's retry never overwrites another's counts.
Retries don't count toward the 300 cap. A unique (experiment_id, token_hash)
index backs it up; a malformed token is refused (bad_token).

Tests: a contract test for retry, case, shared-device and bad tokens; an e2e
where the first save commits but its answer is dropped, then Save again leaves
exactly one submission (fails on the previous client). On PostgreSQL 16, two
simultaneous copies of the same first save give one row. Plan and README
updated (D3, token lifecycle).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
set_key only checked a minimum of 8 characters, while sign-in accepts at most
200 characters and bcrypt uses only the first 72 bytes. A long new key replaced
the working one and then every request was unauthorized. set_key now refuses
keys over 72 bytes (key_too_long) before touching the stored hash; the change-key
field says 8 to 72 characters and has minlength/maxlength.

Contract test: 73 ASCII characters and 37 two-byte characters are refused, and
the existing key keeps working (fails on the previous function).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
PLAN.md: status is now built and live; the security checklist is ticked
(verified in production); a Production record covers how mitosis_v1 was applied
(SQL Editor), the post-apply checks, the instructor key copy, the rolled-back
smoke test, the anonymous API checks, the advisors, the unchanged livelab
fingerprint, the live page check and what's left before and after the lab.

001_mitosis.sql (comments only): the rollback note names the five-argument
mitosis_save, and the key note is dated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
The Fall 2026 experiment (bio151-mitosis-2026fa) was retitled "Whitefish
Blastula: Observing Mitosis" with samples "Blastula Sample A" / "Blastula
Sample B" in production. That's data, set before any submission with the same
checks as update_experiment; the keys, 25 cells per sample and the stages are
unchanged. This commit adds the matching page text:

- Student form: six counting steps and a stage-clue reference (the five stages,
  cytokinesis counted with telophase, skip unclassifiable cells, the mitotic
  index formula) above the counting tables. Subtitle says "each sample".
- Labs page card text mentions whitefish blastula and Samples A/B.
- README documents the activity and how the production labels were set.

No change to saving, tokens, validation, calculations, dashboards or security.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…student form

Justin asked for the form to stay minimal; the steps and stage clues belong in
the handout. Removes the section and its styles; the README notes it. The
whitefish title, the Blastula Sample A/B labels and the "each sample" subtitle
stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
Officer tools now opens with "Site engagement": "N people have visited the club
website" (since the first counted visit), visitors today / last 7 days / last
30 days, how many came back on another day, how many people signed up for
something, page views, a 30-day bar chart and visitors by page.

How it's counted (msclub/sql/007_club_visits.sql, migration club_v7):
- Public pages (home, sign-up, event pages) send one anonymous view per page
  load from club.js; Officer tools and the QR poster don't. The browser keeps a
  random ID in localStorage; the database stores only its sha256, the day, the
  page and a view count. No cookies, IP addresses or names.
- A visitor is a browser, not a person; the panel says so.
- Browsers that open Officer tools are flagged and left out of every count.
- club_visit (public) validates its input and stops counting new rows past
  3,000 a day; club_stats needs the officer code and returns totals only.
  Private tables, RLS on, no grants, as with the rest of the club schema.

Tests: a contract test (input validation, once per browser/day/page, view
totals, officer devices excluded, no ID or hash in the answer) and e2e checks
(public pages count, Officer tools and QR don't, the panel shows the database
count with the officer's browser left out). axe: no violations on Officer tools
(desktop light, phone dark) or the home page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
How club_v7 was applied (SQL Editor), the post-apply checks, the unchanged club
data checksums, the rolled-back production smoke test, the live check and the
advisors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…ottom

Justin's calls:
- Overall traffic: officers' browsers are no longer left out, and Officer tools
  counts as a page ("Officer tools" in the by-page table). Migration club_v8
  (msclub/sql/008_club_visits_all_traffic.sql) redefines club_stats without the
  exclusion (same signature; p_visitor ignored), drops club.officer_devices,
  and deletes the go-live check's one test visit so the count is real traffic.
- Site engagement moves to the bottom of Officer tools as a collapsed section
  like "Change the officer code", with the visitor count on its title.
- No explanation text on the card (the counting notes stay in the README).

Tests: contract test now checks officers' browsers and Officer tools are
counted and club_stats ignores p_visitor (12/12); e2e checks the collapsed
last section, its title count, that Officer tools sends a visit and the QR
poster doesn't, and that the card has no explanation (passes twice). axe: no
violations with the section open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…only)

Option A of the layout proposal, built so it can be judged in a real browser
with the real schedule before anything on the live pages changes:
- msclub/preview/: a short front page. Up next shows the next meeting once,
  with its flyer; then the next three events as cards, the full-schedule link,
  and recaps.
- msclub/preview/schedule/: List (by date) and Cards views, a "Sign-up open"
  filter, and earlier events; the chosen view is remembered.
- msclub/preview/event/?id=: a page for any event, with details, sign-up, who's
  signed up, the flyer, "Add to my calendar", and a recap after the date.

Read-only: live data through the existing public club_events function and
flyers.json; sign-up buttons open the live sign-up form; club.js doesn't count
visits under preview/. noindex, linked from nowhere, and banner-labelled.
Officer-written page text doesn't exist yet, so it comes from
preview/data/pages.json (samples labelled; STEAM Day's text is from its real
page).

Tests: preview.e2e.mjs (home dedup, three cards, schedule views and filter,
remembered view, event page, recap, no visit or write requests; passes twice).
The club suite still passes (12/12 contract, e2e, check.mjs 8 pages).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
…in UTC

Codex review of #46:
- When officers close sign-up for the whole site (signups_open false), the
  preview no longer labels events "Sign-up open", leaves them out of that
  filter, and shows "Sign-up is closed right now." instead of a button, on the
  cards, list rows, Up next and the event page.
- "Add to my calendar" files wrote floating local times, so a phone in another
  time zone got 5 PM in its own zone. Timed events are now converted from
  Somerset (America/New_York) wall-clock time to UTC using the offset on the
  event's date, so daylight saving time is handled; all-day events stay dates.

Tests: from a Los Angeles browser, the calendar file has 22:00Z for 5 PM EST,
21:00Z/23:00Z for 5-7 PM EDT, and 12:00Z for 8 AM on the day daylight time
starts; all-day events stay dates. With sign-up closed site-wide there are no
buttons, the note shows, and the filter is empty. Each check fails on the
previous code; the preview test passes twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
The deploy of #46 (18c261f) failed twice with "Found 0 artifact(s) ... No
artifacts named github-pages were found": the artifact uploaded (ID
14186197074) but deploy-pages, running 0.3 s later in the same job, listed
none. The workflow is unchanged since the November 11 deploy that found it, and
githubstatus showed no incident; this is the known listing race between
upload-pages-artifact and deploy-pages in one job (actions/deploy-pages#451).
Re-running the same run can't fix it: it then sees two artifacts.

Upload now runs in a build job and deploy-pages in a dependent deploy job, as
in GitHub's Pages starter workflow. Same actions, versions, permissions and
concurrency group; the site content is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeV3LqXkBQSt2zEKNttaKW
@Justin83
Justin83 marked this pull request as ready for review November 15, 2026 23:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T23:48:39.184156Z 05cdd5d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Justin83
Justin83 merged commit 9f24485 into main Nov 15, 2026
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