Repository navigation
feat(tabs): pick code-group tab icons from the file extension - #455
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
comark-annotate
comark-badge
comark-bundle
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-git-graph
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
There was a problem hiding this comment.
Important
A valid code-group label can now abort parsing and rendering. The inherited-key lookup needs to be fixed before merging.
Reviewed changes — Reviewed the complete PR, including shared file-icon lookup, code-group inference, resolver behavior, tests, and documentation.
- Shared file icons: Extracts the VS Code filename and extension mapping so file trees and code groups use the same defaults.
- Code-group inference: Adds automatic file icons when a host resolver is supplied, preserves explicit and per-label precedence, supports extension overrides, and silently skips unresolved inferred icons.
- Tests and documentation: Adds inference and fallback coverage and documents the new configuration behavior.
Validation: pnpm build and all 61 targeted tabs/file-tree tests passed; public parser and renderer probes reproduced the crash below.
gpt-6.1-sol(xhigh) | 𝕏
Latest result Pull request merged. Final answersSession Pull request merged. Ready: verified the inherited-key fix and resolved review thread. All supplied HEAD checks pass. Locally, 44 tabs tests and 8 file-tree tests pass after building prerequisite packages; lint passes with warnings. Bypassed a pnpm database-access error using installed tools directly. No remaining actionable findings or source changes needed. Pushed a36da2e to fix the inherited-key crash and add public parse/render regressions. All 44 tabs tests and 11 file-tree tests pass; lint passes with warnings. Thread resolution was rejected because the provider detected a changed PR head, so the thread remains open for the next pass. Awaiting hosted checks. |
There was a problem hiding this comment.
✅ No new issues found; no P0 or P1 findings remain.
Reviewed changes — Reviewed a36da2e, the fix and regression coverage added since the prior Pullfrog review at a9c495d.
- Restricted file-icon lookup: Added own-property checks for both filename and extension candidates, preventing inherited keys from reaching the icon resolver while preserving lookup precedence.
- Added regression coverage: Verified that
constructor,__proto__,toString, andhasOwnPropertyremain plain labels during parsing and HTML rendering, with and without a host resolver.
Validation: all 62 targeted tabs/file-tree tests passed, as did eight regression scenarios through built public exports. Direct builds of zoom, icon, tabs, and file-tree passed, including publint; pnpm build was blocked by the environment error error: could not lock config file .git/config: Read-only file system.
gpt-6.1-sol(xhigh) | 𝕏

A code group's tabs show an icon only when each code block writes
icon=after its label, so[app.tsx]and[data.json]tabs had none unless the author looked up two Iconify names.Now a code group's tab named after a file takes that file's icon from the VS Code set, the same one comark-file-tree draws for it: by whole name first (
package.json,tsconfig.json), then by extension. The map moves fromcomark-file-treetoshared/file-icons.ts, so both packages draw a file alike.icon=and theiconsoption by label still win, and aniconskey that starts with a dot, such as".vue", sets an extension's icon.::tabslabels and labels like[pnpm]are unchanged.Like comark-file-tree, this needs an
iconResolverfrom the host, which comark-ui passes. A baretabs(), such as the one comark-linter loads, fetches nothing for a file. A file icon that doesn't load leaves its tab without one and adds no issue, since the document has nothing to fix.Validation: the new tabs test (
[app.tsx],[data.json],[package.json],[App.vue]with an extension override,icon=winning,[pnpm]and::tabswithout one) fails onmainand passes here. The tabs and file-tree suites pass, and so dovp check,tsrs, the docs typecheck, and Vite Doctor. Inpnpm test, onlyremark-to-comark's "refuses to migrate with no git repository" times out, the same on a branch that doesn't touch it. I haven't looked at the tabs in a browser.🤖 Generated with Claude Code