GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(web): add explicit context-menu layout and focus options by Adamulek123 · Pull Request #8458 · pingdotgg/t3code Conversation
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| cleanup(null, "interaction"); | ||
| return; | ||
| } | ||
| const action = contextMenuAcceleratorAction(items, event); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium src/contextMenuFallback.ts:302
Pressing an accelerator attached to a header: true item returns the header's id and closes the fallback menu, even though headers are non-interactive and are stripped from native menus. contextMenuAcceleratorAction must skip header items before matching their accelerators.
In file @apps/web/src/contextMenuFallback.ts around line 302:
Pressing an accelerator attached to a `header: true` item returns the header's `id` and closes the fallback menu, even though headers are non-interactive and are stripped from native menus. `contextMenuAcceleratorAction` must skip header items before matching their accelerators.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (event.key === "Escape") { | ||
| event.preventDefault(); | ||
| cleanup(null); | ||
| cleanup(null, "interaction"); | ||
| return; | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium src/contextMenuFallback.ts:297
Pressing Escape closes the menu but also reaches GhosttyTerminalSurface.onKeyDown, so an interactive terminal command is cancelled. preventDefault() does not stop propagation; call stopPropagation() before cleanup, as for accelerator actions.
| if (event.key === "Escape") { | |
| event.preventDefault(); | |
| cleanup(null); | |
| cleanup(null, "interaction"); | |
| return; | |
| } | |
| if (event.key === "Escape") { | |
| event.preventDefault(); | |
| event.stopPropagation(); | |
| cleanup(null, "interaction"); | |
| return; | |
| } |
In file @apps/web/src/contextMenuFallback.ts around lines 297-301:
Pressing Escape closes the menu but also reaches `GhosttyTerminalSurface.onKeyDown`, so an interactive terminal command is cancelled. `preventDefault()` does not stop propagation; call `stopPropagation()` before cleanup, as for accelerator actions.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| for (const item of items) { | ||
| if (item.disabled) continue; | ||
| if (item.children) { | ||
| const childAction = contextMenuAcceleratorAction(item.children, event); | ||
| if (childAction !== null) return childAction; | ||
| } | ||
| if (!item.accelerator) continue; | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium src/contextMenuFallback.ts:206
When a parent item has children and an accelerator, pressing that accelerator resolves the menu with the parent id, even though the fallback only uses that item to open its submenu. After checking the children, skip the parent accelerator so only a matching leaf action is returned.
for (const item of items) {
- if (item.disabled) continue;
- if (item.children) {
+ if (item.disabled) continue;
+ if (item.children?.length) {
const childAction = contextMenuAcceleratorAction(item.children, event);
if (childAction !== null) return childAction;
+ continue;
}
if (!item.accelerator) continue;In file @apps/web/src/contextMenuFallback.ts around lines 206-213:
When a parent item has `children` and an `accelerator`, pressing that accelerator resolves the menu with the parent `id`, even though the fallback only uses that item to open its submenu. After checking the children, skip the parent accelerator so only a matching leaf action is returned.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| cleanup(null, "interaction"); | ||
| return; | ||
| } | ||
| const action = contextMenuAcceleratorAction(items, event); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium src/contextMenuFallback.ts:302
CommandOrControl+C and CmdOrCtrl+C never trigger an action in the fallback menu, so items using Electron’s documented cross-platform accelerator work natively but not in the browser menu. contextMenuAcceleratorAction only recognizes ctrl, alt, command, and cmd, causing both documented tokens to match neither ctrlKey nor metaKey; normalize or reject these accelerator strings before invoking the matcher.
In file @apps/web/src/contextMenuFallback.ts around line 302:
`CommandOrControl+C` and `CmdOrCtrl+C` never trigger an action in the fallback menu, so items using Electron’s documented cross-platform accelerator work natively but not in the browser menu. `contextMenuAcceleratorAction` only recognizes `ctrl`, `alt`, `command`, and `cmd`, causing both documented tokens to match neither `ctrlKey` nor `metaKey`; normalize or reject these accelerator strings before invoking the matcher.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the changed web UI surfaces (apps/web/src/contextMenuFallback.ts, apps/web/src/localApi.ts) against the shared component system and token ownership.
Good: the new kbd hint reuses the exact MenuShortcut treatment from components/ui/menu.tsx (ms-auto font-medium font-sans text-secondary-label text-xs tracking-widest) and reads the runtime-adjusted --contrast-secondary-label role in the imperative style string, and dropping the inline min-height/font-size overrides makes the default rows finally match the MenuItem geometry (min-h-8 text-base sm:min-h-7 sm:text-sm).
Two findings on the new accelerator handling, where the fallback diverges from the accelerator grammar it shares with the Electron host and from the app's shared shortcut-label formatting.
Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| function formatContextMenuAccelerator(accelerator: string): string { | ||
| const parts = accelerator.split("+"); | ||
| if (!parts.some((part) => part === "Command" || part === "Cmd")) return accelerator; | ||
| const key = parts.at(-1) ?? ""; | ||
| return `${parts.includes("Ctrl") ? "⌃" : ""}${parts.includes("Alt") ? "⌥" : ""}${ | ||
| parts.includes("Shift") ? "⇧" : "" | ||
| }⌘${key}`; | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The hint notation is chosen by sniffing the accelerator string for Command/Cmd rather than from the platform, so presentation is inconsistent with the rest of the UI: on macOS an item declared "Ctrl+Shift+C" renders the literal text Ctrl+Shift+C, while Kbd/MenuShortcut consumers, the command palette and keybindings settings all render macOS hints as ⌃⇧C via formatShortcutLabel in keybindings.ts. The new test asserting ["Ctrl+Shift+C", "⇧⌘V"] shows two notations mixed inside one popup. The last part is also passed through unnormalized, so "Command+Shift+v" renders ⇧⌘v where the shared formatter would produce ⇧⌘V (and named keys like Escape/ArrowUp stay raw).
Suggest formatting through the shared keybindings label logic (platform from isMacPlatform(navigator.platform), symbol order ⌃⌥⇧⌘, formatShortcutKeyLabel-style key casing) instead of a local variant, so fallback menu hints match every other shortcut hint in the app.
Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const parts = item.accelerator.toLowerCase().split("+"); | ||
| if ( | ||
| event.key.toLowerCase() === parts.at(-1) && | ||
| event.altKey === parts.includes("alt") && | ||
| event.ctrlKey === parts.includes("ctrl") && | ||
| event.metaKey === (parts.includes("command") || parts.includes("cmd")) && | ||
| event.shiftKey === parts.includes("shift") | ||
| ) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The modifier vocabulary here is narrower than the grammar this same accelerator string is handed to. ElectronMenu.ts now forwards item.accelerator straight to Electron's native menu, whose accelerator tokens include CommandOrControl/CmdOrCtrl, Control, Option and Super. This matcher only understands ctrl, alt, shift, command/cmd, so the canonical cross-platform form ("CmdOrCtrl+Shift+C") can never match in the styled/web host: metaKey === parts.includes("command") and ctrlKey === parts.includes("ctrl") are both false on every platform. The item then shows a shortcut hint that silently does nothing on web, while working on desktop.
Suggest normalizing modifier tokens once (control→ctrl, option→alt, cmdorctrl/commandorcontrol→meta on macOS else ctrl, super→meta) and sharing that helper with formatContextMenuAccelerator, so both hosts accept the same notation.
Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit efd2e94. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const onWheel = (event: WheelEvent) => { | ||
| if (!isNodeWithinMenuStack(event.target, menuStack)) { | ||
| cleanup(null, "interaction"); | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Medium Severity
The new wheel listener closes the fallback menu immediately, without the canDismissFromPointer delay used by pointerdown and contextmenu. Trackpad momentum or a two-finger right-click that also emits a small wheel delta can dismiss the menu in the same frame it opens, including for existing callers that never opted into the new layout or lifecycle options.
Reviewed by Cursor Bugbot for commit efd2e94. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a cross-host context-menu feature that adds browser keyboard interception, focus and cancellation lifecycle management, wheel dismissal, compact/styled presentation, and native accelerator wiring across shared production infrastructure. The breadth of runtime behavior and unresolved shortcut/dismissal concerns make human review appropriate. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note 🤖 GPT-5.6 Sol responding on behalf of Theo We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together. We are not adding explicit layout and focus options to the web context menu. The existing actions remain available, and these extra preferences are not a priority. If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…and skip a check plainly at a usage limit Champion models replace role classes for a Champion's own runs: a machine default for checks and for advice and setup, each with an optional backup, and a per-Champion override. A check retries once on the backup, else ends skipped with its reasons and the next check runs on time. Pi quota-limited failures are classed as usage limits. Build: pingdotgg#8458 fix(champions): a usage-limit retry that did nothing, failover continuations, and omitted overrides A retry counts only when the claim got a new message; a continuation by the server's own account failover belongs to the same check claim; a failed account counts as skipped for its model when picking the backup; saving a Champion without models keeps its override (an empty object clears it); the defaults control stays on the open Champion's machine; the fork record states the contract break. Build: pingdotgg#8458 fix(server): migration 081 keeps the attachments an array on newer SQLite A subquery drops the JSON subtype, so json_set stored the filtered attachments as a string. Wrapping it in json() keeps the array. The landing gate runs this test whenever Migrations.ts changes. Build: pingdotgg#8458
…ne usage-limit definition
Champion prompts say how checks and advice pick a model and what a skipped check is; the advisor line no longer says it never runs on another model. The run list and the upsert tool say how Champion models and overrides work (models {} clears). The sweep treats a failure as a usage limit by the same test threads use (class or message), waits two minutes for account failover and then retries itself. The migration 081 repair and the fork record are unchanged in meaning; the editor tool payload ceilings rise 300 characters for t3_champions_models.
Build: pingdotgg#8458 Ticket: pingdotgg#8467
Build: pingdotgg#8458
…building Champion models Build: pingdotgg#8458
Command Code reports 'quota-limited (weekly; next reset ...)', which the usage-limit test missed, so neither threads nor Champions released a check that ended on it. Matches quota-limit and quota-limited. Build: pingdotgg#8458 Ticket: pingdotgg#8470 Build: pingdotgg#8458
… or ends as skipped A check the server might finish itself is claimed even when no model can run. If collection then did not finish it, dispatch failed 'unavailable' on every sweep, writing attention and activity each time and never releasing the claim. Dispatch now resolves a model for the claim, or ends the check as skipped. Build: pingdotgg#8458 Ticket: pingdotgg#8473 Build: pingdotgg#8458
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.