feat: visual upgrades cherry-picked from #4 redesign#5
feat: visual upgrades cherry-picked from #4 redesign#5jeremylongshore wants to merge 2 commits intomainfrom
Conversation
Cherry-picked visual improvements from PR #4 redesign while preserving existing discovery-first copy, Firebase infrastructure, and booking CTAs. - TrustBar: animated marquee with correct proof points (1,550+ stars, 270+ plugins, 1,537 skills) - ProjectShowcase: upgraded project grid with gradient borders and scroll-reveal - FAQSection: accessible accordion with real business FAQs - Replaced React Products component with static Astro ProjectShowcase Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Review Summary by QodoAdd visual upgrades with TrustBar, ProjectShowcase, and FAQ accordion components
WalkthroughsDescription• Add three new visual components: TrustBar marquee, ProjectShowcase grid, FAQSection accordion • Replace React Products component with static Astro ProjectShowcase featuring gradient borders and scroll-reveal animations • Implement accessible accordion with 6 business FAQs, vanilla JS, keyboard navigation • Initialize beads issue tracking system with Git hooks and Dolt backend integration Diagramflowchart LR
Hero["Hero"] --> TrustBar["TrustBar<br/>Animated Marquee"]
TrustBar --> Tiers["ClaudeCodeTiers"]
Tiers --> Learn["Learn/Colab<br/>Section"]
Learn --> Showcase["ProjectShowcase<br/>Replaces Products"]
Showcase --> Contact["Contact"]
Contact --> FAQ["FAQSection<br/>Accordion"]
FAQ --> Footer["Footer"]
File Changes1. astro-site/src/components/home/TrustBar.astro
|
Code Review by Qodo
1. Projects hidden without JS
|
📝 WalkthroughWalkthroughThe PR introduces Beads/Dolt database integration with new git hooks, updates gitignore rules for Dolt artifacts and runtime files, adds comprehensive BEADS workflow documentation, and overhauls the homepage with three new interactive Astro components (FAQ accordion, project showcase grid, tech/stats marquee). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the landing page's visual appeal and user experience by introducing modern, interactive UI components. It also refines the project's backend infrastructure by migrating its internal database management to Dolt and formalizing an issue tracking workflow for AI agents. The changes focus on improving aesthetics and developer tooling without altering existing content, calls-to-action, or core Firebase infrastructure. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
🔥 Firebase Preview deployed! Preview URL: https://intent-landing-page--pr-5-jqrzq6a3.web.app |
| /* Scroll-reveal initial state */ | ||
| .project-card { | ||
| opacity: 0; | ||
| transform: translateY(20px); | ||
| transition: | ||
| opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), | ||
| transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); | ||
| } | ||
|
|
||
| .project-card.revealed { | ||
| opacity: 1; | ||
| transform: translateY(0); | ||
| } |
There was a problem hiding this comment.
1. Projects hidden without js 🐞 Bug ⛯ Reliability
ProjectShowcase.astro renders all project cards with CSS opacity: 0 and only makes them visible when client-side JS adds the "revealed" class. If JS doesn’t run (blocked/error) or IntersectionObserver is unavailable, the Projects section will appear empty.
Agent Prompt
### Issue description
Project cards are invisible by default (`opacity: 0`) and only become visible if client-side JS successfully adds the `revealed` class. This creates an empty Projects section when JS is blocked/errors or when `IntersectionObserver` isn’t available.
### Issue Context
This section is intended to be “fully static Astro,” but it currently relies on JS for basic visibility.
### Fix Focus Areas
- astro-site/src/components/home/ProjectShowcase.astro[119-131]
- astro-site/src/components/home/ProjectShowcase.astro[268-300]
### Implementation direction (one acceptable approach)
1. Change CSS so `.project-card` is visible by default.
2. Gate the hidden/animated initial state behind a JS-present flag, e.g. add `document.documentElement.classList.add('js')` at the top of the script and use `:global(html.js) .project-card { opacity: 0; ... }`.
3. Add a fallback: if `!('IntersectionObserver' in window)`, immediately add `revealed` to all cards.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Code Review
This pull request introduces several significant visual upgrades by adding new, well-implemented Astro components (TrustBar, ProjectShowcase, FAQSection) and also migrates the project's issue tracking to bd (beads) with Dolt. While the new frontend components are solid, the tooling migration has introduced a couple of issues. Most critically, a user-specific lock file has been committed, which needs to be removed and git-ignored. There is also some duplicated content in the AGENTS.md documentation that should be cleaned up.
| { | ||
| "pid": 225013, | ||
| "parent_pid": 224994, | ||
| "database": "/home/jeremy/000-projects/intent-solutions-landing/.beads/beads.db", | ||
| "version": "0.49.1", | ||
| "started_at": "2026-03-07T02:43:29.984012756Z" | ||
| } |
There was a problem hiding this comment.
This file appears to be a runtime-generated lock file. It contains a user-specific absolute path (/home/jeremy/...) which should not be committed to version control. Committing local environment files can leak information and will cause the project to fail for other developers. Please remove this file from the repository and add daemon.lock to .beads/.gitignore to prevent it from being tracked in the future.
| ## Landing the Plane (Session Completion) | ||
|
|
||
| **When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. | ||
|
|
||
| **MANDATORY WORKFLOW:** | ||
|
|
||
| 1. **File issues for remaining work** - Create issues for anything that needs follow-up | ||
| 2. **Run quality gates** (if code changed) - Tests, linters, builds | ||
| 3. **Update issue status** - Close finished work, update in-progress items | ||
| 4. **PUSH TO REMOTE** - This is MANDATORY: | ||
| ```bash | ||
| git pull --rebase | ||
| bd sync | ||
| git push | ||
| git status # MUST show "up to date with origin" | ||
| ``` | ||
| 5. **Clean up** - Clear stashes, prune remote branches | ||
| 6. **Verify** - All changes committed AND pushed | ||
| 7. **Hand off** - Provide context for next session | ||
|
|
||
| **CRITICAL RULES:** | ||
| - Work is NOT complete until `git push` succeeds | ||
| - NEVER stop before pushing - that leaves work stranded locally | ||
| - NEVER say "ready to push when you are" - YOU must push | ||
| - If push fails, resolve and retry until it succeeds |
There was a problem hiding this comment.
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (2)
.gitignore (1)
51-53: Scope the*.dbignore rule more narrowly.
*.dbnow hides every database file in the repo, so any intentional fixture or example DB will never appear ingit status. Prefer ignoring only the specific Dolt/BEADS paths you actually generate.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.gitignore around lines 51 - 53, The current .gitignore entry '*.db' is too broad; replace it with a scoped pattern that only ignores Dolt-generated DB files (reference the existing '.dolt/' entry and the '*.db' pattern). Update the ignore rule to target the Dolt directory or the specific Dolt/BEADS output paths (e.g., files under .dolt/ or the exact subdirectory names your tooling generates) so intentional example or fixture .db files elsewhere in the repo remain visible to git..beads/.gitignore (1)
40-45: Verify the breadth of the*.db?*wildcard pattern.The pattern
*.db?*is broad and matches any file with.dbfollowed by one or more characters (e.g.,.dba,.db1,.dbx,.db_backup), not just SQLite artifacts like.db-wal,.db-shm,.db-journal. This may be intentional for safely ignoring all database-like files, but please confirm.Additionally, lines 43-45 explicitly list
*.db-journal,*.db-wal, and*.db-shm, which are already matched by*.db?*. While this redundancy improves clarity, you may optionally remove them to simplify the pattern list.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.beads/.gitignore around lines 40 - 45, The .gitignore entry '*.db?*' is very broad and will match any file with .db plus extra chars; confirm whether the intent is to ignore all database-like files or only SQLite artifacts; if you only want SQLite artifacts narrow the pattern (e.g., use explicit patterns like '*.db-wal', '*.db-shm', '*.db-journal' and remove or replace '*.db?*'), otherwise keep the broad '*.db?*' and optionally remove the redundant explicit entries '*.db-journal', '*.db-wal', and '*.db-shm' to simplify the list while ensuring the intended files remain ignored.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.beads/.gitignore:
- Around line 1-51: The .beads/.gitignore in this diff (containing entries like
"dolt/", "redirect", ".local_version", "ephemeral.sqlite3", etc.) does not match
the PR description about UI component changes; either this file was accidentally
included or the PR description is wrong—remove .beads/.gitignore from this
changeset if it was added unintentionally (unstage/reset the file and amend the
commit / create a separate infra PR), or if the infra change is intentional,
update the PR title/description to explicitly mention the .beads/.gitignore and
Dolt/BEADS config changes so reviewers know the scope.
- Around line 1-3: Replace the broad dolt ignore entries with the specific
Dolt-recommended runtime patterns: remove the existing "dolt/" and
"dolt-access.lock" rules and instead add rules for ".dolt/noms/LOCK",
".dolt/noms/journal.idx", ".dolt/noms/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv" (journal
files), ".dolt/noms/oldgen/", and "config.yaml" so the repository keeps Dolt
history while ignoring only transient runtime files; leave unrelated app files
like "dolt-server.*" and "dolt-monitor.pid" unchanged.
In `@AGENTS.md`:
- Around line 107-113: The "Auto-Sync" section currently gives competing sync
instructions (bd dolt push / bd dolt pull vs the required workflow); update this
section to document one canonical sync path: instruct contributors to run the
repo-required sequence "git pull --rebase" → "bd sync" → "git push" and remove
or reframe direct usage of "bd dolt push" / "bd dolt pull" (e.g., note they are
internal to bd and not part of the contributor workflow). Ensure the section
title "Auto-Sync" and mentions of "bd sync", "bd dolt push", "bd dolt pull",
"git pull --rebase", and "git push" are updated so only the canonical workflow
is presented as the required path.
- Around line 127-152: The "Landing the Plane (Session Completion)" section is
duplicated; remove one copy to resolve markdownlint MD024 by deleting the
redundant block containing the heading "Landing the Plane (Session Completion)"
and its MANDATORY WORKFLOW numbered list and CRITICAL RULES, keeping a single
authoritative instance; locate the duplicate by searching for the exact heading
text and ensure any internal references still point to the retained section,
then run markdownlint to confirm MD024 is resolved.
In `@astro-site/src/components/home/FAQSection.astro`:
- Around line 231-261: The setupFAQ function re-attaches click handlers on every
astro:page-load causing duplicate toggles; make setupFAQ idempotent by either
removing existing listeners before adding or short-circuiting if already
initialized: check and set a flag (e.g., data attribute on a parent or a
module-level boolean) or iterate triggers and call removeEventListener for the
same handler before adding; ensure you reference the same handler when removing
and keep usage of trigger elements, triggers NodeList, and the collapse/expand
functions unchanged.
---
Nitpick comments:
In @.beads/.gitignore:
- Around line 40-45: The .gitignore entry '*.db?*' is very broad and will match
any file with .db plus extra chars; confirm whether the intent is to ignore all
database-like files or only SQLite artifacts; if you only want SQLite artifacts
narrow the pattern (e.g., use explicit patterns like '*.db-wal', '*.db-shm',
'*.db-journal' and remove or replace '*.db?*'), otherwise keep the broad
'*.db?*' and optionally remove the redundant explicit entries '*.db-journal',
'*.db-wal', and '*.db-shm' to simplify the list while ensuring the intended
files remain ignored.
In @.gitignore:
- Around line 51-53: The current .gitignore entry '*.db' is too broad; replace
it with a scoped pattern that only ignores Dolt-generated DB files (reference
the existing '.dolt/' entry and the '*.db' pattern). Update the ignore rule to
target the Dolt directory or the specific Dolt/BEADS output paths (e.g., files
under .dolt/ or the exact subdirectory names your tooling generates) so
intentional example or fixture .db files elsewhere in the repo remain visible to
git.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 88aa41f4-44a9-4663-ad22-a0998ad8a77e
⛔ Files ignored due to path filters (2)
.beads/daemon.lockis excluded by!**/*.lock.beads/dolt-monitor.pid.lockis excluded by!**/*.lock
📒 Files selected for processing (14)
.beads/.gitignore.beads/hooks/post-checkout.beads/hooks/post-merge.beads/hooks/pre-commit.beads/hooks/pre-push.beads/hooks/prepare-commit-msg.beads/interactions.jsonl.beads/metadata.json.gitignoreAGENTS.mdastro-site/src/components/home/FAQSection.astroastro-site/src/components/home/ProjectShowcase.astroastro-site/src/components/home/TrustBar.astroastro-site/src/pages/index.astro
| # Dolt database (managed by Dolt, not git) | ||
| dolt/ | ||
| dolt-access.lock | ||
|
|
||
| # Daemon runtime files | ||
| daemon.lock | ||
| daemon.log | ||
| daemon.pid | ||
| # Runtime files | ||
| bd.sock | ||
| bd.sock.startlock | ||
| sync-state.json | ||
| last-touched | ||
|
|
||
| # Local version tracking (prevents upgrade notification spam after git ops) | ||
| .local_version | ||
|
|
||
| # Legacy database files | ||
| # Worktree redirect file (contains relative path to main repo's .beads/) | ||
| # Must not be committed as paths would be wrong in other clones | ||
| redirect | ||
|
|
||
| # Sync state (local-only, per-machine) | ||
| # These files are machine-specific and should not be shared across clones | ||
| .sync.lock | ||
| export-state/ | ||
|
|
||
| # Ephemeral store (SQLite - wisps/molecules, intentionally not versioned) | ||
| ephemeral.sqlite3 | ||
| ephemeral.sqlite3-journal | ||
| ephemeral.sqlite3-wal | ||
| ephemeral.sqlite3-shm | ||
|
|
||
| # Dolt server management (auto-started by bd) | ||
| dolt-server.pid | ||
| dolt-server.log | ||
| dolt-server.lock | ||
| dolt-server.port | ||
| dolt-server.activity | ||
| dolt-monitor.pid | ||
|
|
||
| # Backup data (auto-exported JSONL, local-only) | ||
| backup/ | ||
|
|
||
| # Legacy files (from pre-Dolt versions) | ||
| *.db | ||
| *.db?* | ||
| *.db-journal | ||
| *.db-wal | ||
| *.db-shm | ||
| db.sqlite | ||
| bd.db | ||
|
|
||
| # Merge artifacts (temporary files from 3-way merge) | ||
| beads.base.jsonl | ||
| beads.base.meta.json | ||
| beads.left.jsonl | ||
| beads.left.meta.json | ||
| beads.right.jsonl | ||
| beads.right.meta.json | ||
|
|
||
| # Keep JSONL exports and config (source of truth for git) | ||
| !issues.jsonl | ||
| !metadata.json | ||
| !config.json | ||
| # NOTE: Do NOT add negation patterns here. | ||
| # They would override fork protection in .git/info/exclude. | ||
| # Config files (metadata.json, config.yaml) are tracked by git by default | ||
| # since no pattern above ignores them. |
There was a problem hiding this comment.
Flag: Mismatch between PR objectives and file content.
The PR objectives describe visual component upgrades (TrustBar, ProjectShowcase, FAQSection) for a landing page, but this file contains Dolt database and BEADS tooling infrastructure configuration. Please verify that this file is part of the intended changeset for PR #5, or update the PR description to reflect the actual scope.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.beads/.gitignore around lines 1 - 51, The .beads/.gitignore in this diff
(containing entries like "dolt/", "redirect", ".local_version",
"ephemeral.sqlite3", etc.) does not match the PR description about UI component
changes; either this file was accidentally included or the PR description is
wrong—remove .beads/.gitignore from this changeset if it was added
unintentionally (unstage/reset the file and amend the commit / create a separate
infra PR), or if the infra change is intentional, update the PR
title/description to explicitly mention the .beads/.gitignore and Dolt/BEADS
config changes so reviewers know the scope.
| # Dolt database (managed by Dolt, not git) | ||
| dolt/ | ||
| dolt-access.lock |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
What runtime files and directories does DoltDB create that should be added to gitignore?
💡 Result:
If you’re using Git (the file VCS) in a folder that you also run Dolt in, the main runtime-generated artifacts you may want to ignore are:
.dolt/noms/LOCK(created while the DB is in use) [1].dolt/noms/journal.idx(optional index to speed loading the journal) [1].dolt/noms/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv(the “journal” file used for local updates) [1].dolt/noms/oldgen/(created bydolt gc) [1]config.yaml(auto-generated when you rundolt sql-serverin a new directory) [2]
A practical .gitignore snippet:
# Dolt runtime artifacts (inside the Dolt data dir)
.dolt/noms/LOCK
.dolt/noms/journal.idx
.dolt/noms/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
.dolt/noms/oldgen/
# Dolt sql-server autogen config (if you don’t want it tracked)
config.yamlNote: you typically should not ignore the entire .dolt/ directory unless you don’t want Dolt data/history in Git at all. [1]
Sources: [1] [2]
🏁 Script executed:
cat -n .beads/.gitignoreRepository: intent-solutions-io/intent-solutions-landing
Length of output: 1647
Align Dolt ignore patterns with official documentation.
The current patterns diverge from Dolt's official guidance. Dolt recommends NOT ignoring the entire .dolt/ directory; doing so discards version history. Instead, ignore only specific runtime files within .dolt/noms/:
.dolt/noms/LOCK(created while DB is in use).dolt/noms/journal.idx(optional journal index).dolt/noms/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv(journal file for local updates).dolt/noms/oldgen/(created bydolt gc)config.yaml(auto-generated bydolt sql-server)
Replace dolt/ and dolt-access.lock (line 2–3) with these specific patterns. Note: dolt-server.* and dolt-monitor.pid (lines 29–35) are custom application files unrelated to Dolt's official runtime artifacts.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.beads/.gitignore around lines 1 - 3, Replace the broad dolt ignore entries
with the specific Dolt-recommended runtime patterns: remove the existing "dolt/"
and "dolt-access.lock" rules and instead add rules for ".dolt/noms/LOCK",
".dolt/noms/journal.idx", ".dolt/noms/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv" (journal
files), ".dolt/noms/oldgen/", and "config.yaml" so the repository keeps Dolt
history while ignoring only transient runtime files; leave unrelated app files
like "dolt-server.*" and "dolt-monitor.pid" unchanged.
| ### Auto-Sync | ||
|
|
||
| bd automatically syncs via Dolt: | ||
|
|
||
| - Each write auto-commits to Dolt history | ||
| - Use `bd dolt push`/`bd dolt pull` for remote sync | ||
| - No manual export/import needed! |
There was a problem hiding this comment.
Document one canonical sync path.
This section tells contributors to use bd dolt push/bd dolt pull, but the mandatory workflow below still requires bd sync. That leaves two competing sync instructions in the same file.
Based on learnings, the repo’s required landing workflow still uses git pull --rebase → bd sync → git push, so this section should be aligned with that.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 107 - 113, The "Auto-Sync" section currently gives
competing sync instructions (bd dolt push / bd dolt pull vs the required
workflow); update this section to document one canonical sync path: instruct
contributors to run the repo-required sequence "git pull --rebase" → "bd sync" →
"git push" and remove or reframe direct usage of "bd dolt push" / "bd dolt pull"
(e.g., note they are internal to bd and not part of the contributor workflow).
Ensure the section title "Auto-Sync" and mentions of "bd sync", "bd dolt push",
"bd dolt pull", "git pull --rebase", and "git push" are updated so only the
canonical workflow is presented as the required path.
| ## Landing the Plane (Session Completion) | ||
|
|
||
| **When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. | ||
|
|
||
| **MANDATORY WORKFLOW:** | ||
|
|
||
| 1. **File issues for remaining work** - Create issues for anything that needs follow-up | ||
| 2. **Run quality gates** (if code changed) - Tests, linters, builds | ||
| 3. **Update issue status** - Close finished work, update in-progress items | ||
| 4. **PUSH TO REMOTE** - This is MANDATORY: | ||
| ```bash | ||
| git pull --rebase | ||
| bd sync | ||
| git push | ||
| git status # MUST show "up to date with origin" | ||
| ``` | ||
| 5. **Clean up** - Clear stashes, prune remote branches | ||
| 6. **Verify** - All changes committed AND pushed | ||
| 7. **Hand off** - Provide context for next session | ||
|
|
||
| **CRITICAL RULES:** | ||
| - Work is NOT complete until `git push` succeeds | ||
| - NEVER stop before pushing - that leaves work stranded locally | ||
| - NEVER say "ready to push when you are" - YOU must push | ||
| - If push fails, resolve and retry until it succeeds | ||
|
|
There was a problem hiding this comment.
Remove the duplicated “Landing the Plane” section.
Lines 127-152 repeat the earlier section from Lines 15-40, which is why markdownlint is reporting MD024. Keeping both copies will drift.
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 127-127: Multiple headings with the same content
(MD024, no-duplicate-heading)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 127 - 152, The "Landing the Plane (Session
Completion)" section is duplicated; remove one copy to resolve markdownlint
MD024 by deleting the redundant block containing the heading "Landing the Plane
(Session Completion)" and its MANDATORY WORKFLOW numbered list and CRITICAL
RULES, keeping a single authoritative instance; locate the duplicate by
searching for the exact heading text and ensure any internal references still
point to the retained section, then run markdownlint to confirm MD024 is
resolved.
| <script> | ||
| // Smooth accordion with height animation | ||
| function setupFAQ() { | ||
| const triggers = document.querySelectorAll<HTMLButtonElement>('.faq-trigger'); | ||
|
|
||
| triggers.forEach((trigger) => { | ||
| trigger.addEventListener('click', () => { | ||
| const isExpanded = trigger.getAttribute('aria-expanded') === 'true'; | ||
| const panelId = trigger.getAttribute('aria-controls'); | ||
| if (!panelId) return; | ||
| const panel = document.getElementById(panelId); | ||
| if (!panel) return; | ||
|
|
||
| if (isExpanded) { | ||
| // Collapse | ||
| collapse(trigger, panel); | ||
| } else { | ||
| // Close any currently open item first | ||
| triggers.forEach((otherTrigger) => { | ||
| if (otherTrigger !== trigger && otherTrigger.getAttribute('aria-expanded') === 'true') { | ||
| const otherId = otherTrigger.getAttribute('aria-controls'); | ||
| if (!otherId) return; | ||
| const otherPanel = document.getElementById(otherId); | ||
| if (otherPanel) collapse(otherTrigger, otherPanel); | ||
| } | ||
| }); | ||
| expand(trigger, panel); | ||
| } | ||
| }); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Potential duplicate event listeners on view transitions.
When astro:page-load fires (on every navigation in View Transitions), setupFAQ re-runs and attaches additional click handlers to the same triggers. This can cause the accordion to toggle multiple times per click.
Consider either removing old listeners or checking if already initialized:
🛠️ Proposed fix: guard against re-initialization
function setupFAQ() {
const triggers = document.querySelectorAll<HTMLButtonElement>('.faq-trigger');
triggers.forEach((trigger) => {
+ // Skip if already initialized
+ if (trigger.dataset.faqInitialized) return;
+ trigger.dataset.faqInitialized = 'true';
+
trigger.addEventListener('click', () => {
// ... existing handler
});
});
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@astro-site/src/components/home/FAQSection.astro` around lines 231 - 261, The
setupFAQ function re-attaches click handlers on every astro:page-load causing
duplicate toggles; make setupFAQ idempotent by either removing existing
listeners before adding or short-circuiting if already initialized: check and
set a flag (e.g., data attribute on a parent or a module-level boolean) or
iterate triggers and call removeEventListener for the same handler before
adding; ensure you reference the same handler when removing and keep usage of
trigger elements, triggers NodeList, and the collapse/expand functions
unchanged.
Summary
Cherry-picks the best visual elements from PR #4 while preserving all existing copy, CTAs, and Firebase infrastructure.
Productscomponent — gradient border hover effects, scroll-reveal animations, fully static Astro (no JS framework hydration)What was NOT brought over from #4
Page flow (new)
Hero → TrustBar → ClaudeCodeTiers → Learn/Colab/Accelerator → Also Available → ProjectShowcase → Contact → FAQ → Footer
Test plan
bun run buildpasses (verified locally)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores