Skip to content

frontend: Implement new Activity feature for tabs and windows#3583

Merged
k8s-ci-robot merged 26 commits intokubernetes-sigs:mainfrom
sniok:tabs-windows
Jul 16, 2025
Merged

frontend: Implement new Activity feature for tabs and windows#3583
k8s-ci-robot merged 26 commits intokubernetes-sigs:mainfrom
sniok:tabs-windows

Conversation

@sniok
Copy link
Contributor

@sniok sniok commented Jul 7, 2025

This PR adds new Activity concept, allowing users to manage terminals, logs, and tasks outside of a details view.
It's a generic system for opening new tabs/window, resizing them, minimizing.
This replaces drawer mode.

You create a new activity by calling

Activity.launch({
  id: "some-id",
  content: <div>content</div>,
  location: "split-right",
});

All activities are stored in the activitySlice redux store.

Settings were updated

image

Related Issue

Fixes #3486 #3419

Steps to Test

  1. Open resource details
  2. Open terminals
  3. Open logs
  4. Open Edit dialogs
  5. Open Create new resource dialog

Testing done

  1. Manual testing
  2. a11y Axe check
  3. Fastpass a11y check

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 7, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 7, 2025
@sniok sniok removed request for joaquimrocha and skoeva July 7, 2025 12:37
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 7, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2025
@sniok sniok force-pushed the tabs-windows branch 7 times, most recently from 40329e3 to ea7c7cf Compare July 8, 2025 14:20
@sniok sniok marked this pull request as ready for review July 9, 2025 07:57
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 9, 2025
@sniok sniok requested a review from Copilot July 9, 2025 08:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Introduces a generic Activity system for managing UI panels as tabs/windows and replaces the old detail-drawer mode throughout the frontend.

  • Registers the new activityReducer in the root Redux reducer and ports stream calls to include cluster context.
  • Adds Activity.launch, Activity.update, and Activity.close calls across components (pods, editors, logs, search links, etc.).
  • Updates i18n keys for new UI options (“Window”, “Full page”, “Overview”) and removes old “Overlay” drawer toggle.

Reviewed Changes

Copilot reviewed 59 out of 59 changed files in this pull request and generated 2 comments.

File Description
frontend/src/redux/reducers/reducers.tsx Adds activity slice to combined reducers
frontend/src/components/common/Resource/CreateButton.tsx Replaces dialog-state with Activity.launch for creation
frontend/src/i18n/locales/zh/translation.json (and other locales) Adds keys for new Activity modes and removes “Overlay”
Comments suppressed due to low confidence (1)

frontend/src/i18n/locales/zh/translation.json:12

  • The translation value for "Window" is empty; please provide the proper Chinese translation to ensure localization completeness.
  "Overview": "概览",

Copy link
Contributor

@joaquimrocha joaquimrocha left a comment

Choose a reason for hiding this comment

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

I like that you used the icon for different resources and it looks nice, but seems redundant when we have the name repeated? Maybe something to handle later.
Screenshot

@joaquimrocha
Copy link
Contributor

Oops, clicked submit too early. One sec.

Copy link
Contributor

@joaquimrocha joaquimrocha left a comment

Choose a reason for hiding this comment

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

Great job @sniok ! It does bring Headlamp to another level of productivity.
Please do check my comments in some of the code.

Here are also some issues I found during testing:

  1. The Node Shell doesn't use the windowed rendering
  2. In the map view, the taskbar covers the map zoom lower side buttons
  3. I wonder how discoverable the snapping left/right is. Would it work if we added snap-left/snap-right/maximize buttons to the right of the drag-::: handle? Leaving only the minizime + close button to the right? (maybe it looks bad, just throwing out ideas)

@yolossn
Copy link
Contributor

yolossn commented Jul 10, 2025

Hey, this looks great, really intuitive and smooth overall.I wanted to share a few issues and thoughts I encountered during testing:

It will be good have an option to close the tabs from the overview
image

I noticed a few rendering issues when multiple tabs were open:

  1. When switching between two tabs the activity bar moved up and down based on the tab that was selected
Activity.tab.render.issue.mov
  1. When multiple logs, exec and detail tabs were open the logs on the right side started bleeding out of the tab.
Activity.Tab.issue.2.mov

The tabs are missing Cluster contexts

  1. When tabs from multiple clusters are open the tabs dont display which cluster they belong to.
Cluster.Context.missing.in.tabs.mov
  1. Also, if a user is viewing two tabs from different clusters (say A and B) and is currently in the context of cluster B, all links, even from the tab that belongs to cluster A, direct to cluster B.
Cluster.Context.issue.with.Links.in.details.tab.mov

@joaquimrocha
Copy link
Contributor

Wow! Great findings @yolossn ! Thank you!

@joaquimrocha joaquimrocha removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2025
sniok added 22 commits July 16, 2025 10:30
@joaquimrocha
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 16, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joaquimrocha, sniok

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 30087c7 into kubernetes-sigs:main Jul 16, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage terminals/logs/tasks outside of a details view

4 participants