Skip to content

chore(studio/frontend): normalize line endings to LF#6012

Open
danielhanchen wants to merge 2 commits into
mainfrom
fix/studio-frontend-eol-lf
Open

chore(studio/frontend): normalize line endings to LF#6012
danielhanchen wants to merge 2 commits into
mainfrom
fix/studio-frontend-eol-lf

Conversation

@danielhanchen
Copy link
Copy Markdown
Member

What

45 source files under studio/frontend/ were committed with CRLF (10 files) or mixed (35 files) line endings, while the rest of the repo and the JS/TS tooling assume LF. This normalizes them to LF.

  • Adds a scoped rule to .gitattributes:
    studio/frontend/** text=auto eol=lf
    
    Scoped to the frontend tree (rather than repo-wide *.ts/*.tsx/… rules) so it can't force LF on files elsewhere. text=auto lets Git auto-detect and leave binary assets (logos, fonts) untouched while text files are stored as LF.
  • Runs git add --renormalize studio/frontend to rewrite the affected blobs.
  • Adds .git-blame-ignore-revs listing the normalization commit so git blame skips it (GitHub applies this automatically).

Why

Pure diff-hygiene / consistency. There's no functional breakage today — JS/TS tooling tolerates CRLF — but mixed endings produce noisy diffs and confuse git blame/editors. This complements the existing *.py and *.sh LF rules.

Reviewing

The first commit is whitespace-only (CRLF → LF) — no source content changed. Verified with:

$ git diff --ignore-cr-at-eol origin/main..<normalize-commit>
 .gitattributes | 6 ++++++
 1 file changed, 6 insertions(+)

i.e. once CR-at-EOL is ignored, the only real change is the .gitattributes rule. Review with whitespace hidden (append ?w=1 to the Files-changed URL). The normalization commit is isolated and listed in .git-blame-ignore-revs.

git ls-files --eol studio/frontend after the change:

565 i/lf w/lf      # text files: index + worktree both LF
 61 i/-text w/-text # binary assets, untouched
  5 i/none w/none   # empty / single-line

Scope

Standalone PR. Independent of #5997 (the *.sh EOL rule, already on main) and #5940 (installer). No logic changes.

danielhanchen and others added 2 commits June 4, 2026 12:56
45 source files under studio/frontend/ were committed with CRLF or mixed
line endings while the rest of the repo and the JS/TS tooling assume LF.

Add a scoped `studio/frontend/** text=auto eol=lf` rule to .gitattributes
and run `git add --renormalize studio/frontend` so these files are stored
with LF in the index. The rule is scoped to the frontend tree (not a
repo-wide *.ts/*.tsx/... policy) so it cannot force LF on files elsewhere;
text=auto leaves binary assets (logos, fonts) untouched.

This commit is whitespace-only (CRLF -> LF) — no source content changed
(verified with `git diff --ignore-cr-at-eol`). It is intentionally
isolated so it can be listed in .git-blame-ignore-revs and skipped by
reviewers and `git blame`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add .git-blame-ignore-revs listing the whitespace-only line-ending
normalization commit so it doesn't pollute `git blame` output. GitHub
applies this file automatically; locally run
`git config blame.ignoreRevsFile .git-blame-ignore-revs`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request normalizes the line endings of the Studio frontend source files to LF. It updates .gitattributes to enforce this policy for the studio/frontend/ directory and adds the normalization commit to .git-blame-ignore-revs to prevent obscuring git blame history. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant