Repository navigation
logo: add openapi piece (fixes #35) - #41
bluzername wants to merge 5 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughAdds an OpenAPI logo piece with monochrome and colored frame output, optional animated glints, and library registration. ChangesOpenAPI logo
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The OpenAPI mark renders recognizably and is registered for library loading and canvas use; no material merge risk is established. 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Closes bas3line#35. Adds a new ascii.rest piece for the OpenAPI Initiative's gauge mark: a green segmented dial with a dark pointer, following the same drawing style as the existing company/logo pieces (cloudflare, vercel, python): one shape grid, a per-cell palette index, and the shared "glint" animation. The art is not hand-traced. It is generated by sampling the mark's own published icon onto a 46x23 grid: each cell gets a density character from its ink coverage and the nearest of 4 colours sampled from the source image (dark pointer, two greens, olive). The dark pointer is lifted on a dark page the same way other pieces lift pure black, so it does not sink into the background. Generation script is not part of this PR, only its output, same as the rest of the pieces in this repo. Testing: npm run check passes for all 217 pieces (one new), npm run typecheck and npm run build are clean, and npm run gen regenerated src/pieces/index.ts and src/library.ts for the new piece. Before this change, npm run check -- openapi fails with "no file src/pieces/ openapi.ts"; after, it reports the piece ok with cols/rows/fps as expected, and --show renders a recognizable dial and pointer. The OpenAPI mark is a trademark of its owner, shown here only to name the specification, same disclaimer as other company/logo pieces in this repo.
22edaa7 to
61ed9d2
Compare
|
@bluzername is attempting to deploy a commit to the Shubham Team on Vercel. A member of the Team first needs to authorize it. |
|
Rebase onto current main. No change to the piece itself, just regenerate library.ts and pieces/index.ts with npm run gen so it include openapi without losing the pieces added since. check/typecheck/build all still clean (237/237). |
|
Make sure you do the changes Sensei
[Low impact] The change adds one optional logo to the piece catalog. The PR still needs the generated files under Findings
Fix with agent prompt### Issue 1
src/library.ts:undefined-159
Adding `openapi` without updating `skills/` makes CI fail. `npm run gen` also rebuilds the skill catalog and its piece count, but the committed catalog still skips from `ocaml` to `perl`. CI runs the generator and rejects any changes in `skills/`.
Run `npm run gen` on this branch and commit all generated files.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds the OpenAPI gauge logo as
Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." · Reviewed by Greptile |
rows was 23, but the MONO/ART/INK blocks give 25 lines after the blank padding row above and below. render loop only read up to row 22, so it draw the blank top row plus 21 content rows and skip the last one. set rows to 25, same convention every other piece use.
|
Good catch, confirmed and fixed in d1f7b90. meta.rows was 23 but MONO/ART/INK give 25 line after the blank padding row above and below (same as every other piece in src/pieces, they all set rows to the exact line count). With rows at 23 the render loop only read up to the second-to-last content row, so the bottom of the dial never draw. Set rows to 25, no change to the artwork itself. check/typecheck/build all still clean (237/237), openapi now report 46x25. |
|
Thanks for the contribution. I don't see this logo on ascii.rest nor does this snippet work. <html>
<head> <script type="module" src="https://ascii.rest/ascii.js"></script> </head>
<body><ascii-art piece="openpi"></ascii-art></body>
</html>Is deploying the web site (so the script tag gets the update) done through another repo or issue? |
|
Thanks for check it. Two separate thing here I think:
This branch is also behind main now (few new pieces landed since Oct 15), so it need a rebase before merge - happy to do that once ready. |
| "ocaml": () => import("./pieces/ocaml.ts"), | ||
| "ocean-sunset": () => import("./pieces/ocean-sunset.ts"), | ||
| "omarchy": () => import("./pieces/omarchy.ts"), | ||
| "openapi": () => import("./pieces/openapi.ts"), |
There was a problem hiding this comment.
Missing generated files fail CI
Adding openapi without updating skills/ makes CI fail. npm run gen also rebuilds the skill catalog and its piece count, but the committed catalog still skips from ocaml to perl. CI runs the generator and rejects any changes in skills/.
Run npm run gen on this branch and commit all generated files.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/library.ts
Line: 158
Comment:
**Missing generated files fail CI**
Adding `openapi` without updating `skills/` makes CI fail. `npm run gen` also rebuilds the skill catalog and its piece count, but the committed catalog still skips from `ocaml` to `perl`. CI runs the generator and rejects any changes in `skills/`.
Run `npm run gen` on this branch and commit all generated files.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
I fixed my snippet but it still does not show anything (and nothing in the console) |
|
Ah I see, sorry for confuse you. It is not a bug in the piece, it is because this PR is not merged yet, so ascii.rest (production) still serve the old bundle without Once this get merged and a new version is published, Your idea of a "no-such-piece" fallback render for unknown |
# Conflicts: # src/library.ts
Fixes #35.
What this add
A new piece
openapi, the OpenAPI Initiative gauge mark (green dial, dark pointer). It follow the same pattern ascloudflare.tsandpython.ts: one shape grid, a palette index per cell, and the shared glint animation from those pieces.How I made the art
I did not trace it by hand. I write a small script (not part of this PR, same as other pieces here) that sample the mark's own icon into a 46x23 grid. Each cell get a density character from how much ink cover it, and a colour index from the nearest of 4 colours taken from the image itself (dark pointer, two green, olive). The dark pointer is lifted for the dark page, same as how other pieces lift pure black so it is not lost on dark background.
Checks
npm run check- 217 pieces, all ok (one new)npm run typecheck- cleannpm run build- cleannpm run gen- regeneratedsrc/pieces/index.tsandsrc/library.tsBefore the piece file exist,
node scripts/check.ts openapifail with "no file src/pieces/openapi.ts". After I add it, it say "ok openapi logos 46x23 30fps" and--showrender a dial with a pointer that look like the real logo, checked by eye.One small gotcha I hit while building this:
npm run checkonly checks the contract (size, charset, no randomness, deterministic frames). It does not check if the picture actually look right. I had a bug first where my background threshold was wrong and the whole grid came out solid - check still said "ok" for it. So I always look at--showoutput too, not only the check result.The mark is a trademark of its owner. It is shown here only to name the specification, same note other pieces in this repo already have.
Happy to adjust resolution, colours or the note text if you want something different.
Summary by CodeRabbit