Allow formatting compiled code files, and configure whether code ligatures are used - #152
Merged
Conversation
✅ Deploy Preview for schemabenchmarks ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds two user-facing capabilities to the website: (1) an option to view formatted versions of compiled repository artifacts and (2) a user preference to enable/disable code ligatures (persisted via cookie + analytics).
Changes:
- Introduces server-side code formatting via
oxfmtand exposes it through the repo raw-file viewer (with a UI toggle for compiled artifacts). - Adds a new “Code ligatures” preference (cookie-backed) and wires it into the app root + preferences dialog.
- Updates code block UI to support an actions area and adjusts formatting/import-sorting configuration.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| website/vite.config.ts | Adds oxfmt to client import-protection list. |
| website/src/shared/styles/index.css | Updates font-feature settings and adds ligature toggle CSS + icon styling. |
| website/src/shared/lib/prefs/index.ts | Adds server fns + middleware to get/set ligature preference cookie (+ analytics). |
| website/src/shared/lib/prefs/constants.ts | Adds ligatureSchema and Ligature type. |
| website/src/shared/lib/highlight.ts | Adds getFormattedCodeFn server fn + react-query options wrapper using oxfmt. |
| website/src/shared/lib/analytics.ts | Extends analytics event typings for change_ligature. |
| website/src/shared/components/prefs/provider.tsx | Adds LigatureProvider wiring. |
| website/src/shared/components/prefs/context.tsx | Adds LigatureContext / useLigature. |
| website/src/shared/components/dialog/pref.tsx | Adds “Code ligatures” preference UI option. |
| website/src/shared/components/code/index.tsx | Adds actions slot and renames copy to showCopy. |
| website/src/routes/repo/raw.$.tsx | Adds formatted-view search param + formatting toggle and query usage. |
| website/src/routes/__root.tsx | Loads ligature preference and applies it to the document + provider tree. |
| website/package.json | Adds oxfmt dependency for the website package. |
| pnpm-workspace.yaml | Adds oxfmt to the workspace catalog. |
| pnpm-lock.yaml | Updates lockfile entries for oxfmt catalog usage. |
| package.json | Switches root oxfmt version to catalog:. |
| .oxfmtrc.jsonc | Updates import-sorting config key (experimentalSortImports → sortImports). |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
EskiMojo14
force-pushed
the
code-improvements
branch
4 times, most recently
from
July 16, 2026 17:46
597436a to
9dbf1b7
Compare
EskiMojo14
force-pushed
the
code-improvements
branch
from
July 16, 2026 17:52
9dbf1b7 to
8783f4e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Comments suppressed due to low confidence (1)
website/src/shared/styles/index.css:159
- The styles that used to apply to
.code-block__copyinside.code-block__titlewere moved to.code-block__actions, but MDXpreblocks still render the copy button as a direct child (.code-block__title > .code-block__copy). That copy button will lose the margin/RTL alignment styling. Consider keeping a direct-child fallback selector so both structures are styled.
.code-block__actions {
margin: -0.5rem;
margin-left: auto;
&:dir(rtl) {
margin-left: -0.5rem;
- make sure data attribute is consistent - only enable formatted code for compiled files
EskiMojo14
force-pushed
the
code-improvements
branch
from
July 16, 2026 22:28
8783f4e to
9510a8a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.