Skip to content

feat(ag-p11): tools page — hero, section nav pills, grouped tool sections#886

Merged
ashleyshaw merged 5 commits into
developfrom
feat/ag-p11-tools
Jun 7, 2026
Merged

feat(ag-p11): tools page — hero, section nav pills, grouped tool sections#886
ashleyshaw merged 5 commits into
developfrom
feat/ag-p11-tools

Conversation

@ashleyshaw

@ashleyshaw ashleyshaw commented Jun 7, 2026

Copy link
Copy Markdown
Member

Awesome GitHub Site Phase 11: Tools Page + Phosphor Icons Sitewide

Linked issues

Closes #885

Changelog

Added

  • Awesome GitHub Site Phase 11: Tools page + Phosphor Icons sitewide — Standalone /c/tools.astro with astropuu Wapuu hero, section nav pills (AI Defaults, Scripts, Schemas, Config & Setup), and a build-time Phosphor icon loader (website/src/lib/phosphor.ts) using createRequire for robust package resolution. Updated Icon.astro with ph: prefix routing. Migrated item card and type badge styles into global.css. Updated all category, nav, learn, and home icons to Phosphor equivalents sitewide.

Changed

  • Icon.astro: added ph: prefix routing and weight prop for Phosphor icons
  • catalogue.ts: all eight category icons updated to ph:* equivalents
  • global.css: item card, item mark, item tags, type badge styles moved from scoped [cat].astro styles to shared global
  • [cat].astro: removed duplicate scoped item card / type badge CSS; updated ITEM_MARKS and filter icon to Phosphor
  • AwesomeGithubNav.astro: all icon references updated to ph:* equivalents
  • learn.ts: track icons updated to ph:*
  • index.astro: feature strip icons updated to ph:*

Risk Assessment

Risk Level: Medium

Potential Impact: Icon system change touches every page. A missing SVG file at build time falls back to a neutral placeholder rect — no page would fail to render. CSS moved to global.css is additive; existing scoped styles in tools page are net-new.

Mitigation Steps:

  • Build verified locally: 333 pages, 0 errors
  • All Phosphor icon names confirmed against @phosphor-icons/core package assets
  • Fallback SVG in phosphor.ts catches any missing icon gracefully
  • createRequire path resolution is robust across monorepo and CI environments (Gemini review applied)

How to Test

Prerequisites

  • Node.js 22+, run npm ci in website/
  • Run npm run build — should produce 333 pages with 0 errors

Test Steps

  1. Build: cd website && npm run build — confirm 0 errors, ~333 pages
  2. Tools page: visit /c/tools/ — confirm 4 section nav pills, cards grouped by AI Defaults / Scripts / Schemas / Config & Setup
  3. Catalogue pages: visit /c/agents/, /c/prompts/ etc — confirm Phosphor icons render in cards and filter bar
  4. Homepage: confirm feature strip icons (stack, lightning, shield-check) render correctly
  5. Nav: open Browse dropdown — confirm all icon slots render with Phosphor SVGs
  6. Dark mode: toggle theme — confirm icons inherit currentColor correctly in both modes

Expected Results

All pages build without error. Every ph:* icon renders as an inline SVG with correct size. No broken icon slots anywhere on the site.

Edge Cases to Verify

  • Empty state (no tools items matching a section filter shows no section)
  • Maximum data (all 8 catalogues render their item grids)
  • Error handling (missing Phosphor icon name falls back to placeholder rect)
  • Mobile/responsive design (tools hero collapses, section nav wraps)
  • Accessibility (all icons marked aria-hidden="true", semantic headings)
  • Browser compatibility (inline SVG + CSS custom properties, no JS icons)

Checklist (Global DoD / PR)

  • All AC met and demonstrated
  • Tests added/updated (unit/E2E as appropriate)
  • Accessibility checklist completed (where relevant):
    • Semantic HTML and heading order verified
    • Keyboard navigation and visible focus states verified
    • ARIA used only where needed
    • Contrast and non-colour cues reviewed (WCAG 2.2 AA)
  • Docs/readme/changelog updated (if user-facing)
  • Frontmatter updated where applicable (last_updated and version)
  • I have reviewed and applied the downstream override policy (or linked an approved exception)
  • Security checklist completed (where relevant):
    • Untrusted input validated and sanitised
    • Output escaped for its rendering context
    • Privileged actions enforce nonce and capability checks
    • No secrets/sensitive data introduced; OWASP risks reviewed
  • Code/design reviews approved
  • CI green; linked issues closed; release notes prepared (if shipping)
  • Risk assessment completed above
  • Testing instructions provided above

References

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ashleyshaw, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 16 minutes and 44 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 0413ba37-b927-4ea0-9193-33f2e17b9fcc

📥 Commits

Reviewing files that changed from the base of the PR and between 70289d4 and adba0e1.

⛔ Files ignored due to path filters (1)
  • website/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • CHANGELOG.md
  • website/src/components/AwesomeGithub/AwesomeGithubNav.astro
  • website/src/components/AwesomeGithub/Icon.astro
  • website/src/lib/catalogue.ts
  • website/src/lib/learn.ts
  • website/src/lib/phosphor.ts
  • website/src/pages/c/[cat].astro
  • website/src/pages/c/tools.astro
  • website/src/pages/index.astro
  • website/src/pages/learn/[track]/index.astro
  • website/src/pages/learn/index.astro
  • website/src/styles/global.css
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ag-p11-tools

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

✅ Template check passed after update. Thanks for fixing the PR description.

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #886

CI Status:success
Files changed: 13
Risk Distribution: 0 critical, 0 high, 11 medium, 2 low

Recommendations

  • Ready to proceed pending human review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request migrates the website's icon system to Phosphor Icons (using the "ph:" prefix) and introduces a build-time SVG loader in phosphor.ts. It also adds a new tools page (tools.astro) and refactors shared CSS styles for item cards and type badges into global.css. Feedback focuses on improving the robustness of the package resolution in phosphor.ts using createRequire, optimizing the hero image loading in tools.astro for better LCP, and ensuring a safe fallback for the smooth scroll offset calculation when parsing CSS variables.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread website/src/lib/phosphor.ts Outdated
Comment on lines +5 to +6
import { readFileSync } from "node:fs";
import { resolve } from "node:path";

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.

medium

Using path.resolve with a relative path to ./node_modules is fragile because it depends on the current working directory (process.cwd()), which can vary depending on where the build command is executed (e.g., in monorepos or CI/CD pipelines).

Using createRequire(import.meta.url) to resolve the package path via require.resolve is much more robust and handles package hoisting and monorepo structures perfectly.

Suggested change
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { readFileSync } from "node:fs";
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);

Comment thread website/src/lib/phosphor.ts Outdated
if (cache.has(key)) return cache.get(key)!;

try {
const file = resolve(`./node_modules/@phosphor-icons/core/assets/${weight}/${name}.svg`);

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.

medium

Resolve the path to @phosphor-icons/core using the require.resolve helper created above to ensure it works reliably across different environments and monorepo setups.

Suggested change
const file = resolve(`./node_modules/@phosphor-icons/core/assets/${weight}/${name}.svg`);
const file = require.resolve(`@phosphor-icons/core/assets/${weight}/${name}.svg`);

Comment on lines +76 to +82
<img
src={`${base}assets/wapuus/wapuu-astropuu.png`}
alt=""
aria-hidden="true"
class="tools-wapuu"
loading="lazy"
/>

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.

medium

Since this image is located in the hero section (above the fold), using loading="lazy" can negatively impact the Largest Contentful Paint (LCP) metric. It is recommended to remove loading="lazy" so the browser loads it eagerly.

        <img
          src={`${base}assets/wapuus/wapuu-astropuu.png`}
          alt=""
          aria-hidden="true"
          class="tools-wapuu"
        />

Comment thread website/src/pages/c/tools.astro Outdated
Comment on lines +154 to +156
const navH = parseInt(
getComputedStyle(document.documentElement).getPropertyValue("--nav-h") || "64"
);

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.

medium

If --nav-h is not defined or returns an unparseable value, parseInt will return NaN, which can break the smooth scroll calculation. Using parseInt(...) || 64 ensures a safe fallback to 64 in all cases.

      const navH = parseInt(
        getComputedStyle(document.documentElement).getPropertyValue("--nav-h")
      ) || 64;

@ashleyshaw ashleyshaw requested a review from Copilot June 7, 2026 08:26
@ashleyshaw ashleyshaw marked this pull request as ready for review June 7, 2026 08:26
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added status:needs-review Awaiting code review type:feature Feature or enhancement priority:normal Default priority area:documentation Docs & guides lang:js JavaScript/TypeScript lang:css Stylesheets (CSS/Sass/etc.) lang:md Markdown content/docs lang:json JSON config/content type:chore Chore / small hygiene change meta:needs-changelog Requires a changelog entry before merge labels Jun 7, 2026

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.

Pull request overview

Adds the Phase 11 “Tools” catalogue page and switches the site’s icon system to Phosphor, while consolidating shared catalogue card/badge styling into global CSS for reuse across pages.

Changes:

  • Introduces a standalone /c/tools/ page with hero, section jump pills, and grouped tool sections.
  • Adds a build-time Phosphor SVG loader and updates Icon.astro to route ph:* icon names through it.
  • Moves item card + type badge styling to global.css and updates sitewide icon references to ph:*.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/src/styles/global.css Makes catalogue/tool item card + type badge styles globally reusable.
website/src/pages/learn/index.astro Updates learn track icon fallback to Phosphor.
website/src/pages/learn/[track]/index.astro Updates learn track hero icon fallback to Phosphor.
website/src/pages/index.astro Replaces homepage feature strip icons with Phosphor equivalents.
website/src/pages/c/tools.astro Adds the new grouped Tools page with hero and section navigation.
website/src/pages/c/[cat].astro Switches catalogue item marks and filter icon to Phosphor; removes duplicated scoped CSS now in global.css.
website/src/lib/phosphor.ts Implements build-time SVG loading for @phosphor-icons/core assets with caching + fallback.
website/src/lib/learn.ts Updates learn track icon IDs to Phosphor names.
website/src/lib/catalogue.ts Updates category icon IDs to ph:* values.
website/src/components/AwesomeGithub/Icon.astro Adds ph: routing and optional weight prop for Phosphor icons.
website/src/components/AwesomeGithub/AwesomeGithubNav.astro Updates nav and drawer icon references to Phosphor equivalents.
website/package-lock.json Lockfile normalisation aligned with dependency changes.
CHANGELOG.md Documents Phase 11 Tools page + Phosphor icon migration.
Files not reviewed (1)
  • website/package-lock.json: Language not supported

Comment on lines +147 to +158
pill.addEventListener("click", (e) => {
e.preventDefault();
const targetId = pill.getAttribute("href")?.slice(1);
if (!targetId) return;
const target = document.getElementById(targetId);
if (!target) return;
const navH = parseInt(
getComputedStyle(document.documentElement).getPropertyValue("--nav-h")
) || 64;
const y = target.getBoundingClientRect().top + window.scrollY - navH - 20;
window.scrollTo({ top: y, behavior: "smooth" });
});
claude added 5 commits June 7, 2026 08:30
… ph: prefix

Introduces @phosphor-icons/core at build-time. Icon.astro now routes
ph:name to Phosphor SVGs, falling back to the existing heroicons map.

Closes #885
Updates catalogue.ts category icons, learn track icons, homepage feature
icons, and nav chrome (sun/moon/search/github/menu/close/chevron) to use
ph: prefix Phosphor icons. Item-type marks (robot, terminal-window,
brackets-curly, shield-check, package, etc.) replace old heroicon strokes.
…hero

Standalone /c/tools.astro with 4 sectioned groups (AI Defaults, Scripts,
Schemas, Config & Setup) derived from item types. Section nav pills scroll
to anchors with sticky-header offset. Item-card and type-badge CSS moved
from [cat].astro into global.css for cross-page reuse.
- phosphor.ts: replace path.resolve with createRequire/require.resolve
  for robust package resolution across monorepos and CI environments
- tools.astro: remove loading="lazy" from hero image (LCP improvement)
- tools.astro: use parseInt(...) || 64 fallback for --nav-h CSS var
- CHANGELOG.md: add Phase 11 entry under [Unreleased] > Added

https://claude.ai/code/session_01GVDaZ8ayivyE1yD1VrKWwQ
- Guard against modifier-key clicks so Ctrl+click/middle-click open
  sections in a new tab as expected
- Call history.pushState after smooth-scroll so the URL hash updates
  and back/forward navigation works correctly

https://claude.ai/code/session_01GVDaZ8ayivyE1yD1VrKWwQ
@ashleyshaw ashleyshaw force-pushed the feat/ag-p11-tools branch from afaaf71 to adba0e1 Compare June 7, 2026 08:33
@ashleyshaw ashleyshaw merged commit e9145ff into develop Jun 7, 2026
18 of 19 checks passed
@ashleyshaw ashleyshaw deleted the feat/ag-p11-tools branch June 7, 2026 08:33
@github-actions github-actions Bot removed the type:chore Chore / small hygiene change label Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:documentation Docs & guides lang:css Stylesheets (CSS/Sass/etc.) lang:js JavaScript/TypeScript lang:json JSON config/content lang:md Markdown content/docs meta:needs-changelog Requires a changelog entry before merge priority:normal Default priority status:needs-review Awaiting code review type:feature Feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase 11] Tools page — hero, section nav pills, grouped tool sections

3 participants