Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 1 | /** |
| 2 | * Whether a request comes from a phone, for the pages that open on a list | |
| 3 | * there and on its first item on a wider screen (Chat). The client hint | |
| 4 | * when the browser sends it, else the user agent. A wrong guess costs a | |
| 5 | * click: the page corrects itself once it knows its width. | |
| 6 | */ | |
| 7 | export function isPhone(headers: { get(name: string): string | null }): boolean { | |
| 8 | const hint = headers.get("sec-ch-ua-mobile"); | |
| 9 | if (hint != null) return hint.trim() === "?1"; | |
| 10 | return /iPhone|iPod|Android.+Mobile|Mobile.+Firefox|Windows Phone/i.test(headers.get("user-agent") ?? ""); | |
| 11 | } |
This file's history is long; its oldest lines are credited to the oldest commit read.