Skip to content

feat(sidebar): open an actions menu on right-click of an app row - #26362

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
gsboylan:feat/app-context-menu
Oct 31, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
gsboylan:feat/app-context-menu

Conversation

@gsboylan

@gsboylan gsboylan commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A right-click on an installed app's row in the left sidebar opens a menu with Details and Unpin, and Details shows the Library's update badge when the registry has a newer version of the app.

A sidebar app row has no menu. To unpin an app or open its detail page, a user leaves the page they are on, opens the Library, finds the app's tile, and uses the tile's menu. Issue #7883 asks for a right-click menu on the sidebar's app rows.

Why it matters

The sidebar holds the apps a user keeps at hand, and issue #7883 reports that managing one is reachable only through the Library tile's small menu. Each unpin or detail lookup costs a trip through the Library. The sidebar's Discover count covers only apps the gateway updates, so an update to any other app in the sidebar does not show there.

Not a goal

What changed (motivation → approach → change)

The maintainer comment of 2026-10-08 on #7883 lists three directions (A, a sidebar menu; B, the Library menu only; C, both) and the open questions for each. On 2026-10-27 the issue was marked as needing a maintainer or product decision before work starts, so this PR proposes answers in working code:

  1. Direction. A. The Launchpad rebuild of the Library (LaunchpadTile.tsx) already changed the tile menu the issue describes, and Apps Library: a tile's detail page is only reachable from a hover-hidden menu, while Discover opens details on click #12572 tracks that menu's visibility at rest, so B and the Library half of C are covered elsewhere.
  2. Menu contents. Details and Unpin. A right-click cannot reach Disable or Uninstall, so Uninstall keeps its dependency preview in the Library. An Update item would work for some apps and not others: POST /api/apps/<name>/update answers 400 for an app the gateway does not manage, and only the detail page streams the install log. Details carries the Library tile's update badge instead, for any app the registry lists with a newer version, and the update runs on the detail page.
  3. Right-click and touch on draggable rows. A touch hold on a draggable row stays a drag. The drag starts at 250 ms, before the menu's 700 ms long press, so the menu is turned off while a row is dragged. The one row that cannot be dragged, the open app's row pulled in from the "N more" overflow, opens the menu on a long press. The context-menu key and Shift+F10 open the menu on a focused row.
  4. Relationship to UI density: reduce clutter, consolidate sidebars and headers, tuck away secondary actions #4984. No visible menu button on the rows, as with the sidebar folder menu (feat(sidebar): open the board folder menu on right-click #18844).

The diff:

  • website/src/shell/nav/appRailMenu.tsx (new): AppRailMenu wraps one app row in a context-menu trigger. Details opens /apps/detail/<name> through the navigation leave guard, so a page with an unsaved draft can stop the navigation. Unpin hides the row and moves focus to the next app row, else the previous one, else Library. The badge reads the registry list that the Discover badge already loads (the ['registry'] query, with no refetch on mount) through buildUpdateMap. The badge's text, "Update to v{{version}}", is also the Details item's accessible description. When the registry list fails to load, the menu shows the failure in an ErrorNotice, with the agent hand-off as an ErrorNoticeMenuItem below it that the notice describes, so a failed read is not mistaken for no update. Escape closes the menu and leaves the phone nav drawer open.
  • website/src/shell/nav/navRail.tsx: wraps each sortable app row and the pulled-in overflow row in AppRailMenu, with the trigger turned off while a drag is active.
  • website/src/pages/apps/useAppsData.ts: exports buildUpdateMap, which the Library tiles already use.
  • Docs: a "Rail app menu" row in docs/feature-map/README.md, and the shell file table and Nav sidebar paragraph in docs/system-specs/modules/learn-cron-dashboard.md.

The menu adds no catalog strings: it reuses pages.libraryPage.tile_details, pages.libraryPage.unpin, components.appstore.installedAppCard.update_to, and pages.appsPage.failed_to_load_registry.

Backwards compatibility

Compatible: the diff adds a menu to the sidebar's app rows and exports one function. No route, setting, stored value, or catalog key changes, and a left click, drag to reorder, and the collapsed row's hover label work as before.

Removes nothing: the change only adds a menu and an export.

Tests

website/src/test/App.appRailContextMenu.test.tsx mounts App with mocked pages and opens the menu with a contextmenu event, the event that a right-click and the context-menu key both send. The ten cases:

  • The menu lists Details, then Unpin, and takes focus.
  • Details carries the badge, with "Update to v9.9.9" as its accessible description, for a registry app and a self-managed app that both have a newer version, and none for an app with no newer version. The badge adds no menu item.
  • When the registry read fails, the menu shows "Failed to load registry" through ErrorNotice, followed by an Ask the agent item whose accessible description is that notice, and Details carries no badge.
  • Details opens the detail page without starting an update, and stays put when the page on screen refuses to be left.
  • Unpin hides the row through the stored hidden set and moves focus to the next app row.
  • Unpin of the last app row moves focus to the Library row.
  • A left click on an app row still opens the app.
  • The open app's row pulled in from the "N more" overflow has the menu too.
  • A touch hold on a draggable row lifts it for reorder and opens no menu.
  • On a phone, Escape closes the menu and leaves the nav drawer open.

The waits for the registry read hold the menu open, so a check that never passes fails at its timeout instead of reopening the menu in a loop.

On head 86a352f3c2: npm run build, npm run typecheck, npm run lint, npm run i18n:check against the merge base, scripts/docs-lint.sh, and npx vitest related for the three changed source files (442 files, 6,136 tests) pass. The new file passes 10 of 10 with KIROCREW_ACT_STRICT=1, which fails a test on an act warning, on five runs in order and three shuffled. With the appRailMenu.tsx change reverted, the registry-failure case fails. Before the last rebase, the full local gate ran on df72ee4b67; every failure in it also fails on an untouched copy of that commit, apart from one timing-dependent test that passes when run alone.

Manual verification

On an isolated gateway run from this branch (its own data home, loopback only), in headless Chromium at 1440x900:

  • A right-click on an app row in the collapsed and in the expanded sidebar opens Details and Unpin.
  • Shift+F10 on the focused Channels row opens the menu with focus on Details.
  • HTML Studio 0.1.34, installed from a clone of chhanz/html-studio at 09f4d1d, with 0.1.35 in the official catalog: GET /api/apps/registry reports updateAvailable: true for it, and a right-click on its row shows the badge on Details, with "Update to v0.1.35" as the badge's title and as the item's accessible description.
  • With the browser answering GET /api/apps/registry with 500, a right-click on an app row shows Details, Unpin, the "Failed to load registry" notice, and Ask the agent, whose accessible description is the notice. The endpoint itself falls back to the seed list instead of failing, so the browser supplied the failure.
  • RapiDash in the screenshots is a local test app installed from a folder, with no registry entry.

Not tried on a touch device. A test covers the touch hold on a draggable row; the long press on the overflow row is not tested.

Screenshots / video

Expanded sidebar, right-click on HTML Studio, which has a newer version in the catalog. Details carries the update badge:

image

Expanded sidebar, right-click on Channels while the registry read fails (the browser answered GET /api/apps/registry with 500). The menu shows the failure and the Ask the agent item:

Collapsed sidebar, right-click on an app row:

image

Shift+F10 on the focused Channels row opens the menu with focus on Details:

image
Expanded sidebar, right-click on an app with no newer version image

Related Issues

Part of #7883. Related: #12572 (the Library tile menu's visibility at rest), #4984 (no visible menu button on sidebar rows), and #18844 (the sidebar folder's right-click menu, which this menu follows).

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Oct 30, 2026
@gsboylan
gsboylan marked this pull request as ready for review October 30, 2026 19:26
@gsboylan
gsboylan requested review from a team and KiroCrewCaptain as code owners October 30, 2026 19:26
@gsboylan
gsboylan requested a review from bolichen97 October 30, 2026 19:26
@gsboylan

gsboylan commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Intentionally left out:

  • sync/update - per the original feature request conversation and my investigation there's some outstanding behavioral questions about those and they are not implemented the same way today, so I wanted to minimize the scope of this change. For now, to actually update/sync, you click into the app's details page (or the existing app library flow)
  • disable/uninstall - left out because I had concerns about including destructive actions in a place where they could be accidentally hit. these also require navigating to the details page or the app library

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 86a352f3c219b5265ba56373f4cf7b087007bf00 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the menu is additive, it reuses the existing registry query and buildUpdateMap, it takes nothing away, and rendered evidence is attached.

Notes

[DESIGN-REVIEWED] 86a352f

Description read

[DESCRIPTION-READ] ac6e32be195760bf8dda700cbd05332788b5ed3d524fb23deaffe9d756116481

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 86a352f3c219b5265ba56373f4cf7b087007bf00 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing the registry-failure state of the menu. The diff adds an inline "Failed to load registry" notice and an "Ask the agent" item, and none of the four attachments shows them.

Evidence gaps

  • Registry-failure menu state (appRailMenu.tsx: registryFailure && (<ContextMenuSeparator/> … <ErrorNotice …/> <ErrorNoticeMenuItem …/>)). Attachments 01–04 show only Details and Unpin, with and without the badge. Nothing shows the separator, the 260px-wide notice or the hand-off item inside a small menu. That leaves its wrapping, its height next to two short items, and whether "Ask the agent" reads as an action for this failure unjudged. To close it, attach a screenshot of a right-click on an app row with GET /api/apps/registry answering 500. The description says this was already done during manual verification, so a capture from that run would work.

Notes

  • The update badge on Details (attachment-01) is an accent dot with an up arrow, and the version shows only in a title tooltip. A sighted pointer user sees that an update exists but not which version until they hover. That matches the Library tile, so this is consistency, not a defect. Putting "v{{version}}" as text in the badge would make it read at a glance.
  • This lane had no blind first-time read. Once the missing still is attached, the Details, Unpin and badge controls that the screenshots do show can pass on that basis.

[UX-REVIEWED] 86a352f

Description read

[DESCRIPTION-READ] e478b7b7a127a9abe8bec78f73f4663d0b59e7e8b79d2c93cef060e3c35aef40

That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 86a352f3c219b5265ba56373f4cf7b087007bf00 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. Every item reuses an existing mechanism: the shared ['registry'] query, toggleAppNavHidden, buildUpdateMap and the detail route. The menu is a new capability added beside the Library tile menu, which stays as it is.

What this change ships

Inventory (7 items) — 7 justified

Intent: let a user unpin an installed app, or open its details, straight from its sidebar row without a trip through the Library (#7883). This is an ADDITION.

  1. A right-click, the context-menu key or Shift+F10 on an app row in the sidebar opens a menu with Details and Unpin — justified
  2. Details shows the Library tile's update badge when the registry has a newer version — justified
  3. A failed registry read shows a notice and an Ask the agent item inside the menu — justified
  4. After Unpin, focus moves to the next app row, else the previous one, else Library — justified
  5. On a phone, Escape closes the menu but leaves the nav drawer open — justified
  6. A touch hold on a draggable row still drags; only the static row pulled in from the overflow opens the menu on a long press — justified
  7. buildUpdateMap is now exported for the menu's badge — justified

[FIRST-PRINCIPLES-REVIEWED] 86a352f

Description read

[DESCRIPTION-READ] e40807eca014d6d54883aa05dfd7773917faad67afcfc44b7a748aa24a7c9564

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 86a352f3c219b5265ba56373f4cf7b087007bf00 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 86a352f

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed at 1b32e12. This looks good to ship.

The scope is a sound answer to the open questions on the linked issue: Details and Unpin only, no destructive action reachable from a right-click, and the update itself stays on the detail page. It adds no strings, routes or stored values, and it reuses the Library's own unpin (toggleAppNavHidden) and update map (buildUpdateMap).

What I checked:

  • Details goes through the navigation leave guard and passes no router state, so it starts no update.
  • Unpin calls the same hidden-set toggle the Library tile uses, and focus moves to the next app row, else the previous one, else Library.
  • The registry read shares the ['registry'] query key with the Discover badge, so rows add no extra requests once it is cached.
  • The trigger is disabled while a drag is active, so a touch hold on a draggable row still reorders.
  • The branch merges cleanly with main, and no open PR or main commit covers the same change.

One non-blocking note: appRailMenu.tsx wraps each rail row in the plain ContextMenu plus ContextMenuTrigger asChild form. components/ui/context-menu.tsx has ContextMenuStableTrigger for sidebar rows that are rebuilt on every render, so the Radix menu tree is not re-rendered with each rail render. It does not take disabled today, so moving to it would mean passing that through. Fine as a follow-up.

I will approve once the backend test shards and PR Readiness finish green on this head.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 86a352f3c219b5265ba56373f4cf7b087007bf00 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 86a352f

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Update at 1b32e12: the fork GPT 6.1 lane has now run and raised one blocking finding, which its adjudication upheld, so I am not approving yet.

The finding holds. In appRailMenu.tsx the registry query reads only data, so a failed /api/apps/registry call becomes an empty update map. Details then looks the same as "no update available", with no sign that the check failed. The repo rule it cites (errors-use-error-notice) is a blocking rule.

A small fix: read the query's error, and when it is set, show it in the open menu with ErrorNotice, plus an ErrorNoticeMenuItem that points at the notice through describedBy. A test that makes the registry call fail and checks that the notice shows would pin it.

Everything else from my earlier review still stands. Once a new head clears this lane and readiness passes, I will approve.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 30, 2026
An installed app's row in the sidebar has no menu, so managing the app
means leaving the open page for the Library. A right-click on the row
now opens a menu with Details and Unpin. When the registry reports a
newer version, Details carries the Library tile's update badge. The
version comes from the registry list the Discover badge already loads.
When that list fails to load, the menu shows the failure with an Ask
the agent item, so a missing badge is not mistaken for no update.

The menu starts no update. Details opens the detail page, where Update,
Sync, Disable, and Uninstall stay. Apps installed from a folder and
from a registry therefore update the same way, and a right-click cannot
reach a destructive action. Details goes through the navigation leave
guard, so a page with an unsaved draft can stop the navigation.

The context-menu key opens the menu on a focused row. The menu is
disabled while a row is dragged, so a touch hold on a row still drags it
to reorder. The one row that cannot be dragged, the open app's row
pulled in from the "N more" overflow, opens the menu on a long press.

Part of kirodotdev#7883
@gsboylan
gsboylan force-pushed the feat/app-context-menu branch from 1b32e12 to 86a352f Compare October 30, 2026 23:17

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-reviewed at 86a352f (last reviewed 1b32e12).

The GPT 6.1 blocking finding is fixed in this delta:

  • The registry query now reads error. When it is set, the open menu shows the failure in an inline ErrorNotice ("Failed to load registry", the existing pages.appsPage.failed_to_load_registry string), below a separator.
  • An ErrorNoticeMenuItem sits under it with describedBy pointing at the notice, so the agent hand-off is a real menu item and its accessible description names the failure.
  • No update badge is drawn while the read has failed, so a failed read no longer looks like "no update".
  • New test: with listRegistry rejected, the menu shows the alert, lists Details, Unpin, Ask the agent, and the Ask the agent item is described by the notice. The other tests now wait with the menu open, which removes a retry loop that could starve the timeout.

I found no new issues. The fork workflows for this head are still waiting to start, so I will approve once CI, the AI lanes and readiness are green on this head.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 31, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at 86a352f.

The GPT 6.1 blocking finding from 1b32e12 is fixed at this head: a failed registry read now shows an ErrorNotice in the open menu, with an ErrorNoticeMenuItem it describes, and a new test covers it. I found no other issues in my reviews of this PR.

Gates at this head: every AI lane (Design, UX, First Principles, Opus, GPT) reports no blocking finding, no check is red, there is no merge conflict, and no other change request is open. The last backend test shards and PR Readiness are still running; auto-merge waits for them.

Non-blocking, as noted before: ContextMenuStableTrigger would avoid re-rendering the menu tree on every rail render. Fine as a follow-up.

@bolichen97
bolichen97 enabled auto-merge (squash) October 31, 2026 03:26
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 31, 2026
@bolichen97
bolichen97 merged commit 82877c8 into kirodotdev:main Oct 31, 2026
93 of 100 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants