Skip to content

Agents ready for parsing, update consent and linked icons - #610

Merged
AlexJSully merged 5 commits into
mainfrom
ajs-261008-ai-readiness-website
Oct 9, 2026
Merged

AlexJSully merged 5 commits into
mainfrom
ajs-261008-ai-readiness-website

Conversation

@AlexJSully

Copy link
Copy Markdown
Owner

Originally meant to only update the codebase to ensure it is agent ready for parsing/indexing but ended up adding a proper cookie consent system, a combined privacy & cookie policy, link icons, a dark theme, and a bunch of architecture cleanup along the way.

Agent readiness:

  • Home page is served as Markdown when a client sends Accept: text/markdown (also at /index.md), with Vary: Accept
  • Unknown paths return a Markdown 404 when Markdown is requested, and a 406 when neither HTML nor Markdown is accepted
  • Added llms.txt with a "When to use" section, and /llm.txt serves the same file
  • Updated the JSON-LD with a Person description and an Organization

New routes (all redirect into the home page, there are no new pages):

  • /about goes to /
  • /contact goes to the contact section
  • /privacy, /policy, /cookie, /cookies, /privacy-policy and /cookie-policy open the privacy & cookie policy dialog
  • Redirects and rewrites now live in src/proxy.ts, driven by one routes table in src/constants/routes.ts

Consent:

  • Replaced the old cookie snackbar with a consent banner: "Essential only", "Accept all" and "Customize"
  • Nothing optional runs or is stored until the visitor allows it: analytics (Firebase + Speed Insights), YouTube previews, offline access (service worker) and link icons
  • Ad signals are always denied and Google signals are off in code, no advertising data at all
  • The Firebase SDK is only downloaded once analytics is allowed
  • Withdrawing consent clears what that purpose stored (GA cookies, Firebase IndexedDB, service worker and caches)
  • Choices sync across open tabs, and visitors are asked again every 180 days
  • "Cookie settings" in the footer reopens the choices

Privacy & cookie policy:

  • New combined policy, opened in a dialog from the footer, the banner, or any of the policy routes, without changing the URL
  • Also included in the Markdown version of the home page
  • Written to disclose rather than to promise: no named laws, no guarantees, and links to privacy authorities by region so people can learn about their rights

Link icons:

  • Phrase links show a mark of where they go: the site's own icon for internal links, the linked site's favicon (through DuckDuckGo) once Link icons is allowed, and a generated globe otherwise
  • Email links and links that open a dialog get no icon
  • Publication DOIs are now their own icon links while the whole card stays clickable

Design and accessibility:

  • Site is dark themed by default, using shared colour tokens
  • Shared pill button, without the hover morph animation
  • Banner and dialog work on desktop and mobile; policy tables stack on phones
  • Focus management, Escape to close settings, screen reader announcements, and keyboard-reachable tables

Codebase:

  • Removed duplicated URLs and route strings: profile data, absolute URLs and Markdown responses each live in one place
  • New colocated tests for everything added, plus Cypress coverage for agent readiness, consent, and the policy
  • Updated the architecture docs, CLAUDE.md, the Copilot instructions and the rules files
  • Fixed the project video previews not autoplaying
  • Update package versions

@AlexJSully
AlexJSully requested a balanced review from Copilot October 9, 2026 02:20
@AlexJSully AlexJSully self-assigned this Oct 9, 2026
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
portfolio Ready Ready Preview Oct 9, 2026 12:30pm UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Client Sentry bypasses the consent model, while stale cleanup work and incomplete cache negotiation can violate advertised behavior.

9 open findings
What changed in this PR

Adds agent-readable routes, granular consent controls, privacy-policy UI, link icons, dark-theme tokens, and supporting architecture updates.

Changes:

  • Adds Markdown negotiation, llms.txt, redirects, rewrites, and machine-readable content.
  • Replaces the cookie notice with purpose-based consent and gated optional services.
  • Centralizes shared data/styles and expands unit, E2E, and architecture documentation.
File Description
src/​util/​runWhenIdle.ts Adds idle scheduling helper.
src/​util/​runWhenIdle.test.ts Tests idle and timeout paths.
src/​util/​panelState.ts Adds shared panel state.
src/​util/​panelState.test.ts Tests panel lifecycle.
src/​util/​negotiateContentType.ts Implements Accept negotiation.
src/​util/​negotiateContentType.test.ts Tests negotiation cases.
src/​util/​markdown/​policyMarkdown.ts Renders policy Markdown.
src/​util/​markdown/​policyMarkdown.test.ts Tests policy rendering.
src/​util/​markdown/​notFoundMarkdown.ts Builds Markdown 404s.
src/​util/​markdown/​notFoundMarkdown.test.ts Tests Markdown 404s.
src/​util/​markdown/​markdownResponse.ts Standardizes Markdown responses.
src/​util/​markdown/​markdownResponse.test.ts Tests response headers.
src/​util/​markdown/​llmsTxt.ts Generates llms.txt.
src/​util/​markdown/​llmsTxt.test.ts Validates llms.txt.
src/​util/​markdown/​homeMarkdown.ts Generates full-site Markdown.
src/​util/​markdown/​homeMarkdown.test.ts Tests Markdown content.
src/​util/​locationHash.ts Adds reactive hash handling.
src/​util/​locationHash.test.ts Tests hash updates.
src/​util/​linkIcon.ts Selects and generates link icons.
src/​util/​linkIcon.test.ts Tests icon selection.
src/​util/​isNetworkFast.ts Simplifies network classification.
src/​util/​isNetworkFast.test.ts Updates network expectations.
src/​util/​cookieConsent.ts Removes legacy consent utility.
src/​util/​consent/​useConsent.ts Adds consent hook.
src/​util/​consent/​useConsent.test.tsx Tests hook snapshots.
src/​util/​consent/​consentStore.ts Implements consent persistence.
src/​util/​consent/​consentStore.test.ts Tests storage and tab synchronization.
src/​util/​consent/​clearUnconsentedStorage.ts Clears refused-purpose storage.
src/​util/​consent/​clearUnconsentedStorage.test.ts Tests storage cleanup.
src/​util/​absoluteUrl.ts Centralizes canonical URL resolution.
src/​util/​absoluteUrl.test.ts Tests URL resolution.
src/​styles/​tokens.ts Adds shared dark-theme tokens.
src/​styles/​theme.ts Configures the dark MUI palette.
src/​proxy.ts Adds redirects and content negotiation.
src/​proxy.test.ts Tests proxy routing.
src/​layouts/​GeneralLayout.tsx Integrates consent and policy UI.
src/​layouts/​GeneralLayout.test.tsx Tests layout ordering and landmarks.
src/​data/​structuredData.ts Centralizes JSON-LD data.
src/​data/​structuredData.test.ts Validates structured data.
src/​data/​projects.ts Uses privacy-enhanced YouTube URLs.
src/​data/​profile.ts Centralizes profile data.
src/​constants/​routes.ts Centralizes routes and section IDs.
src/​constants/​index.ts Removes raw network thresholds.
src/​configs/​firebase.ts Lazily starts consented Firebase services.
src/​configs/​firebase.test.ts Tests consent mode and lazy startup.
src/​components/​publications/​Publications.tsx Adds stretched cards and DOI links.
src/​components/​publications/​Publications.test.tsx Tests publication-link behavior.
src/​components/​projects/​ProjectsGrid.tsx Gates videos and adds icons.
src/​components/​projects/​ProjectsGrid.test.tsx Tests consented video previews.
src/​components/​policy/​gate/​PolicyDialogGate.tsx Lazily mounts the policy dialog.
src/​components/​policy/​gate/​PolicyDialogGate.test.tsx Tests lazy dialog mounting.
src/​components/​policy/​dialog/​PolicyDialog.tsx Adds responsive policy dialog.
src/​components/​policy/​dialog/​PolicyDialog.test.tsx Tests dialog opening and closing.
src/​components/​policy/​content/​PolicyContent.test.tsx Tests policy content rendering.
src/​components/​pill-button/​PillButton.tsx Adds shared pill button.
src/​components/​pill-button/​PillButton.test.tsx Tests shared button behavior.
src/​components/​panel-link/​PanelLink.tsx Adds progressively enhanced panel links.
src/​components/​panel-link/​PanelLink.test.tsx Tests panel links.
src/​components/​navbar/​Navbar.tsx Adjusts dark-theme hover styling.
src/​components/​link-icon/​LinkIcon.tsx Renders consent-aware link marks.
src/​components/​link-icon/​LinkIcon.test.tsx Tests link-icon rendering.
src/​components/​footer/​Footer.tsx Adds policy and settings links.
src/​components/​footer/​Footer.test.tsx Tests footer targets and links.
src/​components/​cookie-snackbar/​CookieSnackbar.tsx Removes legacy cookie snackbar.
src/​components/​cookie-snackbar/​CookieSnackbar.test.tsx Removes obsolete tests.
src/​components/​consent/​services/​ConsentedServices.tsx Gates analytics and offline services.
src/​components/​consent/​services/​ConsentedServices.test.tsx Tests service gating and withdrawal.
src/​components/​consent/​controls/​ConsentControls.test.tsx Tests purpose switches.
src/​components/​consent/​banner/​ConsentBanner.test.tsx Tests banner behavior and focus.
src/​app/​page.tsx Removes unconditional Firebase startup.
src/​app/​not-found.tsx Reuses the pill button.
src/​app/​loading.tsx Removes loading route UI.
src/​app/​loading.test.tsx Removes loading UI tests.
src/​app/​llms.txt/​route.ts Serves llms.txt.
src/​app/​llms.txt/​route.test.ts Tests llms.txt response.
src/​app/​index.md/​route.ts Serves home-page Markdown.
src/​app/​index.md/​route.test.ts Tests Markdown route response.
src/​app/​global-error.tsx Reuses the pill button.
src/​app/​error.tsx Reuses the pill button.
package.json Updates package versions.
next.config.js Applies security headers globally.
jest/​setup.ts Clears cookies between tests.
docs/​index.md Links new architecture guides.
docs/​architecture/​utils.md Documents new utilities.
docs/​architecture/​service-worker.md Documents consent-gated registration.
docs/​architecture/​pwa.md Updates service-worker lifecycle.
docs/​architecture/​layouts.md Documents new layout composition.
docs/​architecture/​index.md Links agent and consent guides.
docs/​architecture/​data.md Documents new data modules.
docs/​architecture/​constants.md Updates network constants.
docs/​architecture/​consent.md Adds consent architecture guide.
docs/​architecture/​configs.md Documents gated Firebase startup.
docs/​architecture/​components/​stars.md Updates starfield integration notes.
docs/​architecture/​components/​publications.md Documents revised publication cards.
docs/​architecture/​components/​index.md Updates component inventory.
docs/​architecture/​components/​cookie-snackbar.md Removes obsolete snackbar guide.
docs/​architecture/​components/​consent-banner.md Documents consent UI.
docs/​architecture/​agent-readiness.md Documents machine-readable routes.
cypress/​e2e/​landing.cy.ts Adds consent E2E coverage.
cypress/​e2e/​agent-readiness.cy.ts Adds agent-readiness E2E coverage.
CLAUDE.md Updates architecture guidance.
.github/​copilot-instructions.md Updates repository conventions.
.claude/​rules/​testing.md Documents cookie test cleanup.
.claude/​rules/​code-style.md Updates component and test conventions.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/architecture/consent.md Outdated
Comment thread src/components/consent/services/ConsentedServices.tsx Outdated
Comment thread src/proxy.ts
Comment thread cypress/e2e/landing.cy.ts Outdated
Comment thread src/components/policy/gate/PolicyDialogGate.tsx Outdated
Comment thread src/util/consent/clearUnconsentedStorage.ts Outdated
Comment thread src/util/locationHash.ts Outdated
Comment thread docs/architecture/components/stars.md Outdated
Comment thread docs/architecture/consent.md Outdated
@AlexJSully
AlexJSully merged commit bf56c5a into main Oct 9, 2026
2 checks passed
@AlexJSully
AlexJSully deleted the ajs-261008-ai-readiness-website branch October 9, 2026 12:32

This branch was successfully deployed

1 active deployment
Preview — 1c922362 Deployed Oct 9, 2026 by vercel[bot]
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