Fix Hackatime documentation OG logo - #1617
Conversation
This reverts commit f9ee149ec78b621209f487c67701765ff96a8675.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Greptile SummaryThe PR upgrades and patches Blume so documentation Open Graph generation can use a full local PNG logo, switches documentation typography to Inter, and makes Docker dependency installation aware of Bun patches.
Confidence Score: 4/5The PR appears safe to merge, with the non-blocking concern that its new raster Open Graph conversion path lacks focused automated coverage. The patch and its required assets are wired into repository and Docker installation paths, while the remaining accepted issue is limited to missing regression coverage for the new PNG/JPEG conversion behavior. Files Needing Attention: patches/blume@1.5.1.patch Important Files Changed
Prompt To Fix All With AI### Issue 1
patches/blume@1.5.1.patch:21-34
**Raster logo conversion lacks tests**
This adds image metadata parsing, MIME selection, base64 encoding, and raster-to-SVG conversion without focused automated coverage, so regressions in the newly activated PNG Open Graph path can ship without identifying the broken output.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "Use full Hackatime OG logo" | Re-trigger Greptile |
| + if (!file) { | ||
| + return; | ||
| + } | ||
| + const image2 = readFileSync6(file); | ||
| + if (source.toLowerCase().endsWith(".svg")) { | ||
| + return image2.toString("utf-8"); | ||
| + } | ||
| + const { height, type, width } = imageSize3(image2); | ||
| + if (!height || !width || !type) { | ||
| + return; | ||
| + } | ||
| + const mimeType = type === "jpg" ? "image/jpeg" : `image/${type}`; | ||
| + const dataUri = `data:${mimeType};base64,${image2.toString("base64")}`; | ||
| + return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}"><image href="${dataUri}" width="${width}" height="${height}" /></svg>`; |
There was a problem hiding this comment.
Raster logo conversion lacks tests
This adds image metadata parsing, MIME selection, base64 encoding, and raster-to-SVG conversion without focused automated coverage, so regressions in the newly activated PNG Open Graph path can ship without identifying the broken output.
Context Used: In the Hackatime repo, please ensure that the PR i... (source)
Knowledge Base Used: Documentation site
Prompt To Fix With AI
This is a comment left during a code review.
Path: patches/blume@1.5.1.patch
Line: 21-34
Comment:
**Raster logo conversion lacks tests**
This adds image metadata parsing, MIME selection, base64 encoding, and raster-to-SVG conversion without focused automated coverage, so regressions in the newly activated PNG Open Graph path can ship without identifying the broken output.
**Context Used:** In the Hackatime repo, please ensure that the PR i... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))
**Knowledge Base Used:** [Documentation site](https://app.greptile.com/mahadk/-/custom-context/knowledge-base/hackclub/hackatime/-/docs/documentation-site.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary of the problem
Documentation Open Graph cards used an SVG-only logo path and rendered an undersized, unsuitable mark.
Describe your changes
Upgrade Blume, patch its Open Graph logo resolver to accept local PNG assets and configure the full Hackatime logo. Documentation and Open Graph typography use Inter. Docker builds now copy Bun patches before dependency installation.
Closes #1594
Screenshots / Media