Skip to content

docs: do not gitignore assets#3877

Merged
mrlubos merged 1 commit into
mainfrom
docs/pass-5
May 14, 2026
Merged

docs: do not gitignore assets#3877
mrlubos merged 1 commit into
mainfrom
docs/pass-5

Conversation

@mrlubos
Copy link
Copy Markdown
Member

@mrlubos mrlubos commented May 14, 2026

No description provided.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@mrlubos mrlubos marked this pull request as ready for review May 14, 2026 04:40
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

⚠️ No Changeset found

Latest commit: 87d78c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

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

Project Deployment Actions Updated (UTC)
web Building Building Preview, Comment May 14, 2026 4:40am

Request Review

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. docs 📃 Documentation updates. labels May 14, 2026
@mrlubos mrlubos merged commit e5388e8 into main May 14, 2026
8 of 9 checks passed
@mrlubos mrlubos deleted the docs/pass-5 branch May 14, 2026 04:40
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

Important

The committed assets under web/public/assets/.gen/ will be wiped and regenerated on every web build because web/plugins/generate-images.ts:115-117 calls fs.rmSync(outputDir, { force: true, recursive: true }) at module load time. Anyone running astro dev/astro build will end up with a dirty working tree (or modified binaries) immediately after pulling.

TL;DR — Un-ignores web/public/assets/.gen so the generated image assets can be committed to the repo, and checks in the 22 current outputs.

Key changes

  • Negate .gen/ ignore for web assets — adds !web/public/assets/.gen so files under that directory escape the global .gen/ ignore.
  • Commit 22 generated images.png/.webp/.jpeg variants of hero, logo, and partner logos at multiple widths.

Summary | 23 files | 0 commits | base: maindocs/pass-5


Generated assets get nuked on the next web build

Before: web/public/assets/.gen/ was ignored; assets were produced on demand by the generate-images Vite plugin.
After: The directory is tracked and 22 binaries are committed, but the plugin still unconditionally deletes and regenerates the directory.

The deletion runs at module top-level (not inside buildStart), so it fires the moment Vite/Astro imports astro.config.mjs. The result is that the freshly-checked-in files disappear on the first local pnpm dev/pnpm build of web, leaving a dirty git status and risking accidental "re-commits" with byte-identical-but-timestamp-differing outputs. Either guard the wipe (skip when files exist, or only run when sources are newer), move the cleanup inside buildStart behind a flag, or keep the assets out of git and rely on the build step.

.gitignore · web/plugins/generate-images.ts

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Claude Opus𝕏

Comment thread .gitignore

# test files
.gen/
!web/public/assets/.gen
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.

Un-ignoring this directory conflicts with web/plugins/generate-images.ts:115-117, which calls fs.rmSync(outputDir, { force: true, recursive: true }) at module top-level (not inside buildStart). Every time Astro/Vite loads the config, the committed files are deleted and rewritten — anyone running web locally will see a dirty tree right after checkout. Consider gating the wipe (e.g., skip when assets already exist) or keeping the directory ignored and producing assets only as a build step.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.58%. Comparing base (071d094) to head (87d78c6).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3877   +/-   ##
=======================================
  Coverage   39.58%   39.58%           
=======================================
  Files         532      532           
  Lines       19581    19581           
  Branches     5829     5835    +6     
=======================================
  Hits         7751     7751           
  Misses       9582     9582           
  Partials     2248     2248           
Flag Coverage Δ
unittests 39.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs 📃 Documentation updates. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant