Skip to content

feat(wezterm): Update the tab style#3839

Merged
yutkat merged 1 commit intomainfrom
v49.134
Apr 10, 2026
Merged

feat(wezterm): Update the tab style#3839
yutkat merged 1 commit intomainfrom
v49.134

Conversation

@yutkat
Copy link
Copy Markdown
Owner

@yutkat yutkat commented Apr 10, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 10, 2026 09:48
@yutkat yutkat merged commit 8641536 into main Apr 10, 2026
2 of 5 checks passed
@yutkat yutkat deleted the v49.134 branch April 10, 2026 09:48
Copy link
Copy Markdown

@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 updates several Neovim plugin versions in lazy-lock.json, adjusts the placement of the effortLevel setting in the Claude configuration, and introduces a styled_title function in the WezTerm configuration to format tab titles. Feedback was provided regarding .config/wezterm/on.lua, where the logic for constructing tab title segments is duplicated between single-pane and multi-pane scenarios. Additionally, a redundant style attribute was identified within the styling logic. Refactoring these sections to initialize the segments once would improve code maintainability and reduce complexity.

Comment thread .config/wezterm/on.lua
Comment on lines +39 to 59
local function styled_title(title)
local app, content = title:match("^([^:]+):(.+)$")
if app then
return {
{ Attribute = { Intensity = "Bold" } },
{ Text = app .. ":" },
{ Attribute = { Intensity = "Normal" } },
{ Text = content },
{ Attribute = { Intensity = "Normal" } },
}
end
return { { Text = title } }
end

if #panes <= 1 then
return { { Text = prefix .. active_title } }
local segments = { { Text = prefix } }
for _, s in ipairs(styled_title(active_title)) do
table.insert(segments, s)
end
return segments
end
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 building the tab title segments is duplicated between the single-pane and multi-pane cases. Additionally, the styled_title function contains a redundant Intensity = "Normal" attribute (line 47) since it was already set at line 45.

You can refactor this by initializing and styling the segments list once at the beginning of the function. This improves maintainability and avoids unnecessary function calls and table allocations.

	local segments = { { Text = prefix } }
	local app, content = active_title:match("^([^:]+):(.+)$")
	if app then
		table.insert(segments, { Attribute = { Intensity = "Bold" } })
		table.insert(segments, { Text = app .. ":" })
		table.insert(segments, { Attribute = { Intensity = "Normal" } })
		table.insert(segments, { Text = content })
	else
		table.insert(segments, { Text = active_title })
	end

	if #panes <= 1 then
		return segments
	end

Comment thread .config/wezterm/on.lua
Comment on lines +75 to +78
local segments = { { Text = prefix } }
for _, s in ipairs(styled_title(active_title)) do
table.insert(segments, s)
end
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

This block is redundant if the segments variable is initialized and styled at the beginning of the function as suggested above. Removing this duplication makes the code cleaner and easier to maintain.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the wezterm tab-title rendering to apply different styling to app:content-shaped titles, while also including unrelated repository maintenance updates (Neovim plugin lockfile bumps and a Claude settings reordering).

Changes:

  • Adjust wezterm tab title segmentation to bold only the app: prefix when titles match app:content.
  • Update multiple pinned plugin commits in Neovim’s lazy-lock.json.
  • Move effortLevel within Claude’s settings.json (no semantic change, but unrelated to wezterm styling).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
.config/wezterm/on.lua Adds styled_title helper and changes tab title segment construction for new styling behavior.
.config/nvim/lazy-lock.json Bumps pinned commits for a number of Neovim plugins.
.config/claude/settings.json Reorders/moves effortLevel within the JSON config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .config/wezterm/on.lua
Comment on lines +39 to +51
local function styled_title(title)
local app, content = title:match("^([^:]+):(.+)$")
if app then
return {
{ Attribute = { Intensity = "Bold" } },
{ Text = app .. ":" },
{ Attribute = { Intensity = "Normal" } },
{ Text = content },
{ Attribute = { Intensity = "Normal" } },
}
end
return { { Text = title } }
end
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

styled_title is defined inside create_tab_title, so a new closure is allocated every time the tab title is formatted (which can happen frequently during UI redraws). Consider hoisting styled_title to a module-level local function (or otherwise avoiding per-call function allocation) to reduce overhead in this hot path.

Copilot uses AI. Check for mistakes.
Comment thread .config/wezterm/on.lua
{ Text = app .. ":" },
{ Attribute = { Intensity = "Normal" } },
{ Text = content },
{ Attribute = { Intensity = "Normal" } },
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

In styled_title, the { Attribute = { Intensity = "Normal" } } entry appears twice (before and after content). Given format-tab-title already appends a reset at the end, the final Normal looks redundant and can be removed to simplify the segment list.

Suggested change
{ Attribute = { Intensity = "Normal" } },

Copilot uses AI. Check for mistakes.
Comment on lines 4 to 10
"LspUI.nvim": { "branch": "main", "commit": "946fdfc6cdab03681fc9aafb21cc7086d93509b7" },
"LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" },
"blink-copilot": { "branch": "main", "commit": "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" },
"blink-ripgrep.nvim": { "branch": "main", "commit": "f1e2f0132d4d8b8591e29f4f86f518f6d463371d" },
"blink-ripgrep.nvim": { "branch": "main", "commit": "6a21f6f68513c630b0f3a498f1a38397c83ec12f" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"blink.lib": { "branch": "main", "commit": "b68335357e9fcc2b20445acfcee48034376d64b5" },
"blink.lib": { "branch": "main", "commit": "a459c8fbf51359902971874b5ebe05f6602db8b4" },
"blink.pairs": { "branch": "main", "commit": "4e43012356d33a26f69eae475f746fbe9f325f44" },
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This PR is titled as a wezterm tab-style change, but this lockfile updates multiple Neovim plugin pinned commits. To keep changes reviewable and to avoid coupling unrelated updates, consider moving the lazy-lock.json bump into a separate PR (or updating the PR title/description to reflect the extra scope).

Copilot uses AI. Check for mistakes.
Comment on lines 193 to 199
"podman"
]
},
"effortLevel": "high",
"autoUpdatesChannel": "latest",
"skipDangerousModePermissionPrompt": true,
"skipAutoPermissionPrompt": true
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This PR is titled as a wezterm tab-style change, but it also modifies Claude configuration (effortLevel moved). Consider splitting this into a separate PR (or updating the PR title/description) so the wezterm UI change can be reviewed independently.

Copilot uses AI. Check for mistakes.
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.

2 participants