✨ feat(ui): clickable port links, keyboard shortcuts, live uptime - #676
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe PR adds Docker Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
86076d3 to
6f728eb
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ui/src/components/containers/ContainerPortEntry.vue`:
- Around line 14-18: Update both port-label elements in the template, including
the link and non-link branches around the `container-port-link` and
`container-port-text` symbols, to add the flex min-width override alongside
`truncate` so long `dd.port.label` values can shrink and display an ellipsis
within the port row.
In `@ui/src/components/KeyboardShortcutsOverlay.vue`:
- Around line 20-34: Update KeyboardShortcutsOverlay around the dialog element
and close() to manage modal focus: store the triggering element when the overlay
opens, focus the dialog or close button after rendering, trap Tab and Shift+Tab
within the dialog, and restore the stored element’s focus when close() runs.
Keep focus constrained while visible and use the existing visibility lifecycle.
In `@ui/src/layouts/AppLayout.vue`:
- Around line 1019-1026: Update the onFocusSearch callback in
useKeyboardShortcuts to set isMobileMenuOpen to false before setting
showSearch.value to true, matching the sidebar search button behavior while
leaving onEscapeSearch unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c966ce90-3f65-4caa-b2f5-4141712ec911
⛔ Files ignored due to path filters (1)
CHANGELOG.mdis excluded by!CHANGELOG.md
📒 Files selected for processing (41)
app/model/container.tsapp/watchers/providers/docker/Docker.containers.labels-version-finding.test.tsapp/watchers/providers/docker/Docker.tsapp/watchers/providers/docker/container-init-coverage.test.tsapp/watchers/providers/docker/container-init.tsapp/watchers/providers/docker/docker-image-details-orchestration.tsapp/watchers/providers/docker/label.tscontent/docs/current/configuration/watchers/index.mdxui/src/App.vueui/src/components/KeyboardShortcutsOverlay.vueui/src/components/containers/ContainerFullPageOverviewTab.vueui/src/components/containers/ContainerFullPageTabContent.vueui/src/components/containers/ContainerPortEntry.vueui/src/components/containers/ContainerSideTabContent.vueui/src/components/containers/ContainersGroupedViews.vueui/src/composables/useAgentHosts.tsui/src/composables/useColumnVisibility.tsui/src/composables/useKeyboardShortcuts.tsui/src/composables/useShortcutsOverlay.tsui/src/layouts/AppLayout.vueui/src/locales/en/appShell.jsonui/src/locales/en/containersView.jsonui/src/main.tsui/src/preferences/schema.tsui/src/types/container.d.tsui/src/utils/container-mapper.tsui/src/utils/ports.tsui/tests/components/ComponentImports.spec.tsui/tests/components/ContainerSideTabContent.spec.tsui/tests/components/KeyboardShortcutsOverlay.spec.tsui/tests/components/containers/ContainerFullPageOverviewTab.spec.tsui/tests/components/containers/ContainerFullPageTabContent.spec.tsui/tests/components/containers/ContainerPortEntry.spec.tsui/tests/components/containers/ContainersGroupedViews.spec.tsui/tests/composables/useAgentHosts.spec.tsui/tests/composables/useColumnVisibility.spec.tsui/tests/composables/useKeyboardShortcuts.spec.tsui/tests/composables/useShortcutsOverlay.spec.tsui/tests/layouts/AppLayout.spec.tsui/tests/utils/container-mapper.spec.tsui/tests/utils/ports.spec.ts
Backend plumbing for a new dd.port.label Docker label: comma-separated <port>=<label> pairs (default /tcp) that let operators attach a friendly display name to a specific published port. Parsed alongside the existing dd.* label overrides (table-driven, follows the linkTemplate/displayName pattern) and passed straight through as Container.portLabel — a raw string, consumed and matched against individual ports client-side by the UI's clickable port links feature.
Ports: - New ui/src/utils/ports.ts pure helpers parse the existing details.ports formatted strings, auto-detect http/https from the container-side port (443/8443 -> https), build a link target (bound HostIp, else an agent's resolved host via the new useAgentHosts() composable, else the browser's own hostname), and apply dd.port.label overrides. - ContainerPortEntry.vue renders a published port as a new-tab link (rel=noopener noreferrer) or plain text for internal-only ports; wired into the side panel, both full-page detail tabs, and new opt-in "Ports" cells in the container table and card views. Uptime: - The list view's uptime cell gains a tooltip with the exact start timestamp; the card view now shows a live "Up ..." indicator next to the runtime-status badge, refreshing on the same timer as the table (broadened to also tick in card mode) and matching the full-page detail view's existing display. Docs: dd.port.label labels-table row, a label example, and a details.startedAt row (previously undocumented) in content/docs/current/configuration/watchers/index.mdx.
New useKeyboardShortcuts() composable owns a single global keydown listener: `/` focuses the search bar from anywhere (skipped when focus is already in a text input/textarea/select/contenteditable), `Escape` closes the search bar (in addition to each modal/panel's own existing Escape handling), and `?` opens a new shortcut-reference overlay (KeyboardShortcutsOverlay.vue, styled after ConfirmDialog.vue and backed by a useShortcutsOverlay() singleton, mounted in App.vue next to ConfirmDialog). AppLayout's local Escape-closes-search branch is removed in favor of the composable; a `/` hint joins the existing ⌘K hint on the sidebar search button. Also registers KeyboardShortcutsOverlay in the ComponentImports test's global-components allowlist, and fixes a branch-coverage gap in ports.ts (Number.isFinite overflow path) surfaced by the full-suite run after the parallel port-links work landed.
|
@coderabbitai review |
|
6f728eb to
f6b6e09
Compare
- min-w-0 on ContainerPortEntry link/span so long dd.port.label values ellipsize instead of overflowing the flex row - close the mobile menu before opening search in the `/` shortcut handler, matching the sidebar search button - wire KeyboardShortcutsOverlay's dialog into the existing useFocusTrap composable: focus moves in on open, Tab/Shift+Tab trap within the dialog, focus restores to the trigger on close (guarded if it's gone)
Summary
Three v1.7 roadmap quick wins (6.2, 6.7, 6.8) closing visible UI gaps against Dockhand/Portainer/Arcane.
Clickable port links (6.2)
rel="noopener noreferrer") in the container table (opt-in column), card views, and all three detail surfaces; internal-only ports stay plain text.ui/src/utils/ports.tsfor parse/scheme/link/label logic.dd.port.labelcontainer label for custom display names, threaded through the label-override pipeline into a newContainer.portLabelfield (follows thelinkTemplate/displayNameprecedent). Documented in the watcher label table.useAgentHosts()composable so agent-watched containers link against the right host.Keyboard shortcuts (6.7)
/focuses search from anywhere,Escapecloses it,?opens a shortcut reference overlay (styled afterConfirmDialog).useKeyboardShortcuts()+useShortcutsOverlay()composables;/hint alongside the existing⌘Khint.Container uptime (6.8)
details.startedAtwas already in the payload; the list-view uptime cell gains an exact-timestamp tooltip and the card footer a live "Up …" indicator, both timer-refreshed, matching the detail-page display. Also documented the previously-undocumenteddetails.startedAtfield.Testing
Changelog
dd.port.labeloverrides./,Escape, and?keyboard shortcuts with a localized shortcut reference overlay.portscontainer-table column with responsive visibility and overflow handling.agentandportLabel.useAgentHosts.Concerns
dd.port.labelkey. The summary also reportsdd.portlabel.