Skip to content

chore(fmt): prettier --write pass#21

Merged
sauyon merged 1 commit into
mainfrom
sauyon/fmt-fix-prettier-pass
May 18, 2026
Merged

chore(fmt): prettier --write pass#21
sauyon merged 1 commit into
mainfrom
sauyon/fmt-fix-prettier-pass

Conversation

@sauyon

@sauyon sauyon commented May 18, 2026

Copy link
Copy Markdown
Owner

Eight files drifted from prettier formatting and bun run fmt was failing on main. The changes are purely cosmetic — collapsing/expanding lines around prettier's width limit and dropping redundant parens. No behavior changes.

Unblocks the fmt check on main.

Eight files drifted from prettier formatting and bun run fmt was failing
on main. The changes are purely cosmetic — collapsing/expanding lines
around prettier's width limit and dropping redundant parens. No behavior
changes.

Unblocks the fmt check on main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sauyon
sauyon merged commit 5491cf1 into main May 18, 2026
5 checks passed

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

Copy link
Copy Markdown

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 primarily consists of code formatting and style adjustments across multiple files, such as consolidating multi-line statements and refining whitespace. Review feedback highlights potential logic issues in lib/renderer.ts where the useThemeBg and useThemeFg calculations for inverted cells may not correctly handle default theme colors, potentially leading to incorrect background and text rendering.

Comment thread lib/renderer.ts
// explicit color (programs emit it for "true black" backgrounds, e.g.
// letterboxed image renderings).
const useThemeBg = (cell.flags & CellFlags.INVERSE) ? cell.fgIsDefault : cell.bgIsDefault;
const useThemeBg = cell.flags & CellFlags.INVERSE ? cell.fgIsDefault : cell.bgIsDefault;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The logic for determining useThemeBg when CellFlags.INVERSE is set appears to be incorrect for cells using default colors. If INVERSE is set and cell.fgIsDefault is true, useThemeBg becomes true, which causes the cell to skip painting its background (leaving it as the default theme.background). However, an inverted cell with a default foreground should have its background painted with theme.foreground to reflect the inversion.

Comment thread lib/renderer.ts
// when the cell has the default fg (tag NONE), not when its explicit
// RGB happens to be (0,0,0).
const useThemeFg = (cell.flags & CellFlags.INVERSE) ? cell.bgIsDefault : cell.fgIsDefault;
const useThemeFg = cell.flags & CellFlags.INVERSE ? cell.bgIsDefault : cell.fgIsDefault;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Similarly, the logic for useThemeFg when CellFlags.INVERSE is set seems to result in incorrect text coloring for default colors. If INVERSE is set and cell.bgIsDefault is true, useThemeFg becomes true, causing the text to be painted with theme.foreground. This matches the non-inverted case, meaning the text color does not change when it should likely use theme.background to properly represent the inverted state.

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