Skip to content

bump astro 7#280

Merged
SillyCoon merged 13 commits into
masterfrom
bump-astro-7
Jul 1, 2026
Merged

bump astro 7#280
SillyCoon merged 13 commits into
masterfrom
bump-astro-7

Conversation

@SillyCoon

@SillyCoon SillyCoon commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added a new latest-topics loading state and moved the list into a deferred, faster-loading section.
    • Limited the latest topics list to 6 items for a cleaner dashboard view.
    • Updated the dashboard layout spacing and card sizing for a tighter presentation.
  • Bug Fixes

    • Improved keyboard focus visibility across navigation and dashboard links.
    • Refined topic and grammar point display styling for better readability.
  • Chores

    • Upgraded Astro-related dependencies and updated app configuration for JSON logging and in-memory caching.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates Astro config (JSON logger, in-memory cache) and bumps Astro-related dependency versions, refactors the latest-topics feature into a deferred-loading component with a skeleton fallback and result limiting, adds focus-visible accessibility styling across navigation/dashboard components with a shared focus-ring utility, and applies minor seed-data and layout tweaks.

Changes

Config and Dependency Updates

Layer / File(s) Summary
Astro config and dependency bumps
astro.config.mjs, package.json
Configures JSON logger and in-memory cache in astro.config.mjs; bumps astro, @astrojs/node, @astrojs/solid-js, @astrojs/ts-plugin, and @astrojs/check versions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Latest Topics Streaming Refactor

Layer / File(s) Summary
New deferred content and skeleton components
src/features/latest-topics/LatestTopicsContent.astro, src/features/latest-topics/LatestTopicsSkeleton.astro, src/features/latest-topics/index.ts
Adds LatestTopicsContent to fetch and render topics via callAction, LatestTopicsSkeleton with placeholder pulses, and shared ITEM_CLASS constant.
LatestTopics wrapper simplification and topic limit
src/features/latest-topics/LatestTopics.astro, src/features/latest-topics/actions.ts
Converts LatestTopics.astro into a composition wrapper using server:defer with skeleton fallback, adjusts card layout classes, and limits cached topics to 6 via slice.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Focus-Visible Accessibility Styling

Layer / File(s) Summary
Global focus-ring utility and ring color
src/styles/global.css
Adds a focus-ring @utility for :focus-visible ring styling and darkens the --ring theme variable.
Navigation and dashboard cell focus styling
packages/ui/navigation-button.tsx, packages/ui/navigation-menu.tsx, src/components/DashboardCell.astro
Adds focus-visible ring classes to nav button, removes redundant outline suppression and adds tabIndex to nav menu link, and extends DashboardCell hover/focus styling.

Estimated code review effort: 2 (Simple) | ~10 minutes

Grammar Seed Data and Layout Tweaks

Layer / File(s) Summary
Seed data hide flag
libs/db/seed.ts
Adds a hide boolean to each grammarPointsData entry, true only for "aspect".
Dashboard layout and section styling tweaks
src/pages/dashboard/index.astro, src/components/solid/grammar-point/StructureDisplay.tsx
Reduces dashboard grid vertical gap, adds h-fit to a card, and styles nested strong elements in StructureDisplay.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant LatestTopicsAstro as LatestTopics.astro
  participant LatestTopicsContent
  participant Actions as getLatestTopics action

  Browser->>LatestTopicsAstro: Request dashboard page
  LatestTopicsAstro-->>Browser: Render LatestTopicsSkeleton immediately
  LatestTopicsAstro->>LatestTopicsContent: server:defer render
  LatestTopicsContent->>Actions: Astro.callAction(getLatestTopics)
  Actions-->>LatestTopicsContent: latestTopics.data (up to 6)
  LatestTopicsContent-->>Browser: Stream topic list HTML
Loading

Possibly related PRs

  • SillyCoon/grumma#226: Both PRs bump the same Astro-related dependency versions in package.json (astro, @astrojs/node, @astrojs/check).
  • SillyCoon/grumma#275: Both PRs modify the same keyboard-focus styling in navigation-button.tsx, navigation-menu.tsx, DashboardCell.astro, and global.css.
  • SillyCoon/grumma#277: Both PRs implement the same latest-topics feature files including LatestTopicsContent, LatestTopicsSkeleton, ITEM_CLASS, and the 6-item truncation logic.

Poem

A rabbit hops through configs bright,
Deferring topics with skeleton light 🦴
Focus rings glow soft and true,
Hide flags hushing "aspect" too,
Hop, hop, ship it — review's in sight! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: upgrading the project to Astro 7.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bump-astro-7

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (2)
packages/ui/navigation-button.tsx (1)

33-34: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reimplements the shared focus-ring utility instead of using it.

NavButtonClass hand-codes focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2, which is exactly what the new focus-ring @utility (src/styles/global.css) provides and which ITEM_CLASS (src/features/latest-topics/index.ts) already consumes. Consolidating avoids divergence if the ring styling is tweaked later.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ui/navigation-button.tsx` around lines 33 - 34, NavButtonClass is
duplicating the shared focus-ring styling instead of reusing the new utility.
Update NavButtonClass in navigation-button.tsx to consume the same focus-ring
`@utility` pattern used by ITEM_CLASS, and remove the hand-coded focus-visible
ring classes so the navigation button stays aligned with the shared style
definition.
src/components/DashboardCell.astro (1)

23-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Same manual focus-ring duplication as NavButtonClass, with an inconsistent offset.

This repeats the focus:outline-none focus-visible:ring-2 ... focus-visible:ring-ring pattern already defined as the focus-ring utility (src/styles/global.css), but uses ring-offset-4 instead of -2. See the consolidated comment on global.css for the broader duplication concern; if the larger offset here is intentional (bigger clickable cell), consider extending focus-ring to support an offset variant rather than diverging silently.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/DashboardCell.astro` around lines 23 - 27, The anchor in
DashboardCell is duplicating the manual focus-ring classes instead of using the
shared focus-ring utility, and it also uses a different ring offset. Update the
class list in DashboardCell.astro to rely on the existing focus-ring helper used
elsewhere (like NavButtonClass), or if the larger offset is intentional, add a
dedicated offset variant to the shared utility in global.css and use that symbol
here so the focus styling stays centralized and consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/features/latest-topics/LatestTopicsSkeleton.astro`:
- Around line 5-9: The skeleton placeholders in LatestTopicsSkeleton.astro need
a loading-state accessibility hint for assistive tech. Update the skeleton
rendering inside the Array.from(...).map block so the loading container
announces status with appropriate live-region semantics, or mark the individual
pulsing bars as decorative if they should be ignored. Use the existing
LatestTopicsSkeleton and ITEM_CLASS structure to add the accessible attributes
without changing the visual skeleton.
- Around line 6-8: The placeholder count in LatestTopicsSkeleton and the
`slice(0, 6)` limit in the latest-topics action are duplicated magic numbers
that can drift apart. Extract the limit into a shared constant used by both the
skeleton’s `Array.from({ length: ... })` and the filtering logic in actions.ts
so the UI and data count always stay aligned. Use the existing latest-topics
symbols (LatestTopicsSkeleton and the action that applies slice) to wire both
places to the same source of truth.

In `@src/styles/global.css`:
- Around line 25-32: The new focus-ring utility should be consumed instead of
duplicated, and the Tailwind v4 syntax must be accepted by lint tooling. Update
the call sites in NavButtonClass and the DashboardCell.astro anchor to use the
shared focus-ring utility rather than hand-rolled focus-visible classes, so ring
styling stays centralized. Also verify Biome and Stylelint configuration for
Tailwind v4 nesting/@utility support, or adjust the global.css block only if
required so the `@utility` definition passes CI lint checks.

---

Duplicate comments:
In `@packages/ui/navigation-button.tsx`:
- Around line 33-34: NavButtonClass is duplicating the shared focus-ring styling
instead of reusing the new utility. Update NavButtonClass in
navigation-button.tsx to consume the same focus-ring `@utility` pattern used by
ITEM_CLASS, and remove the hand-coded focus-visible ring classes so the
navigation button stays aligned with the shared style definition.

In `@src/components/DashboardCell.astro`:
- Around line 23-27: The anchor in DashboardCell is duplicating the manual
focus-ring classes instead of using the shared focus-ring utility, and it also
uses a different ring offset. Update the class list in DashboardCell.astro to
rely on the existing focus-ring helper used elsewhere (like NavButtonClass), or
if the larger offset is intentional, add a dedicated offset variant to the
shared utility in global.css and use that symbol here so the focus styling stays
centralized and consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: dbc38d2d-7074-4980-9b49-bc7cff0e0cbd

📥 Commits

Reviewing files that changed from the base of the PR and between f83d5ff and 1ccb6d2.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • astro.config.mjs
  • libs/db/seed.ts
  • package.json
  • packages/ui/navigation-button.tsx
  • packages/ui/navigation-menu.tsx
  • src/components/DashboardCell.astro
  • src/components/solid/grammar-point/StructureDisplay.tsx
  • src/features/latest-topics/LatestTopics.astro
  • src/features/latest-topics/LatestTopicsContent.astro
  • src/features/latest-topics/LatestTopicsSkeleton.astro
  • src/features/latest-topics/actions.ts
  • src/features/latest-topics/index.ts
  • src/pages/dashboard/index.astro
  • src/styles/global.css

Comment on lines +5 to +9
{
Array.from({ length: 6 }).map(() => (
<div class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
))
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Add loading-state accessibility hint to the skeleton.

The pulsing placeholders don't announce a loading state to assistive tech (no role="status"/aria-live or aria-hidden on decorative bars). Given this PR's broader focus on accessibility, worth adding here too.

♿ Proposed fix
 ---
 import { ITEM_CLASS } from ".";
 ---

-{
+<div role="status" aria-label="Loading latest topics">
+{
   Array.from({ length: 6 }).map(() => (
-    <div class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
+    <div aria-hidden="true" class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
   ))
-}
+}
+</div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
Array.from({ length: 6 }).map(() => (
<div class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
))
}
<div role="status" aria-label="Loading latest topics">
{
Array.from({ length: 6 }).map(() => (
<div aria-hidden="true" class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
))
}
</div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/features/latest-topics/LatestTopicsSkeleton.astro` around lines 5 - 9,
The skeleton placeholders in LatestTopicsSkeleton.astro need a loading-state
accessibility hint for assistive tech. Update the skeleton rendering inside the
Array.from(...).map block so the loading container announces status with
appropriate live-region semantics, or mark the individual pulsing bars as
decorative if they should be ignored. Use the existing LatestTopicsSkeleton and
ITEM_CLASS structure to add the accessible attributes without changing the
visual skeleton.

Comment on lines +6 to +8
Array.from({ length: 6 }).map(() => (
<div class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract shared "6" limit into a constant.

The placeholder count here and the slice(0, 6) in actions.ts are two independent magic numbers that must stay in sync manually. If the limit changes in one place, the skeleton will silently mismatch the real item count.

♻️ Proposed fix: shared constant
+// src/features/latest-topics/index.ts
+export const LATEST_TOPICS_LIMIT = 6;
-import { ITEM_CLASS } from ".";
+import { ITEM_CLASS, LATEST_TOPICS_LIMIT } from ".";
 ---
 {
-  Array.from({ length: 6 }).map(() => (
+  Array.from({ length: LATEST_TOPICS_LIMIT }).map(() => (
     <div class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
   ))
 }

And in actions.ts:

-  const topics = (await getLatestTopics()).slice(0, 6);
+  const topics = (await getLatestTopics()).slice(0, LATEST_TOPICS_LIMIT);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Array.from({ length: 6 }).map(() => (
<div class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
))
Array.from({ length: LATEST_TOPICS_LIMIT }).map(() => (
<div class={`${ITEM_CLASS} animate-pulse bg-secondary/20 h-17`} />
))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/features/latest-topics/LatestTopicsSkeleton.astro` around lines 6 - 8,
The placeholder count in LatestTopicsSkeleton and the `slice(0, 6)` limit in the
latest-topics action are duplicated magic numbers that can drift apart. Extract
the limit into a shared constant used by both the skeleton’s `Array.from({
length: ... })` and the filtering logic in actions.ts so the UI and data count
always stay aligned. Use the existing latest-topics symbols
(LatestTopicsSkeleton and the action that applies slice) to wire both places to
the same source of truth.

Comment thread src/styles/global.css
Comment on lines +25 to +32
@utility focus-ring {
&:focus-visible {
@apply ring-2 ring-ring ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-2;
}
&:focus {
outline: none;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

focus-ring utility not consumed by other manual focus-visible declarations; also check linter compatibility.

Two things:

  1. NavButtonClass (packages/ui/navigation-button.tsx) and the <a> in DashboardCell.astro re-implement the same focus:outline-none + focus-visible:ring-2 ring-ring ring-offset-* pattern by hand instead of applying this new focus-ring utility. This creates drift risk — if the ring color/offset here changes, those two call sites won't pick it up automatically.
  2. Static analysis reports errors on this block (Biome: "Tailwind-specific syntax is disabled"; Stylelint: unknown at-rule @utility, missing nesting scoping root). This is consistent with tooling not yet configured for Tailwind v4's @utility/nesting syntax rather than a real bug, but it may still fail CI lint gates.
♻️ Consider consolidating the duplicated call sites
-  "inline-flex w-full disabled:pointer-events-none cursor-pointer gap-1 px-2 py-2 font-bold text-foregrounds-primary text-xl disabled:cursor-help disabled:opacity-50 lg:items-center lg:text-primary-foreground lg:hover:bg-secondary/20 lg:hover:shadow-md active:shadow-sm active:bg-secondary/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";
+  "inline-flex w-full disabled:pointer-events-none cursor-pointer gap-1 px-2 py-2 font-bold text-foregrounds-primary text-xl disabled:cursor-help disabled:opacity-50 lg:items-center lg:text-primary-foreground lg:hover:bg-secondary/20 lg:hover:shadow-md active:shadow-sm active:bg-secondary/10 focus-ring";

Please confirm whether Biome/Stylelint configs need updating for Tailwind v4 @utility syntax so this doesn't fail CI checks.

🧰 Tools
🪛 Biome (2.5.1)

[error] 25-32: Tailwind-specific syntax is disabled.

(parse)

🪛 Stylelint (17.14.0)

[error] 26-26: Missing scoping root (nesting-selector-no-missing-scoping-root)

(nesting-selector-no-missing-scoping-root)


[error] 29-29: Missing scoping root (nesting-selector-no-missing-scoping-root)

(nesting-selector-no-missing-scoping-root)


[error] 25-25: Unexpected unknown at-rule "@utility" (scss/at-rule-no-unknown)

(scss/at-rule-no-unknown)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles/global.css` around lines 25 - 32, The new focus-ring utility
should be consumed instead of duplicated, and the Tailwind v4 syntax must be
accepted by lint tooling. Update the call sites in NavButtonClass and the
DashboardCell.astro anchor to use the shared focus-ring utility rather than
hand-rolled focus-visible classes, so ring styling stays centralized. Also
verify Biome and Stylelint configuration for Tailwind v4 nesting/@utility
support, or adjust the global.css block only if required so the `@utility`
definition passes CI lint checks.

Source: Linters/SAST tools

@SillyCoon SillyCoon merged commit 3c59cbe into master Jul 1, 2026
6 checks passed
@SillyCoon SillyCoon deleted the bump-astro-7 branch July 1, 2026 23:26
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.

1 participant