Skip to content

Focus Page in the DevTools menu uses if let - #1139

Open
Wety14 wants to merge 1 commit into
yetanotherbrowser:mainfrom
Wety14:C12-devtools
Open

Wety14 wants to merge 1 commit into
yetanotherbrowser:mainfrom
Wety14:C12-devtools

Conversation

@Wety14

@Wety14 Wety14 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What changes

No visible change. Removes the unused-result warning on the Focus Page button in DevHead.

Why

The button mapped over the active tab only for its side effect, discarding the mapped value.

Proof

  • Warnings in DevHead.swift
  • ./design-check --head clean
  • run: swift build and swift test

Checklist

  • No visible change, no new menu item or Settings row
  • American English, no em dashes

The Focus Page button mapped over the active tab only for the side effect,
which discards the mapped result and trips a Swift 6 warning. An if let says
what it does and focuses the page the same way.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Wety14
Wety14 marked this pull request as ready for review November 25, 2026 08:55
@Wety14
Wety14 requested a review from serafimcloud as a code owner November 25, 2026 08:55
@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This behavior-preserving change appears safe to merge.

Summary

Replaces Optional.map with if let in the “Focus Page” button to avoid discarding a mapped result.

  • The Focus Page button still focuses the active page.

Reviews (1) · Last reviewed commit: "Focus Page in the DevTools menu uses if ..." · Reviewed by Greptile

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