Skip to content

🐛 Fix card shadows, Trestle flicker, duplicate cancel text#4329

Merged
clubanderson merged 1 commit intomainfrom
fix/ui-polish-batch
Apr 2, 2026
Merged

🐛 Fix card shadows, Trestle flicker, duplicate cancel text#4329
clubanderson merged 1 commit intomainfrom
fix/ui-polish-batch

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

Summary

  • Shadows for cards in light mode #4254 — Card shadows too strong in light mode: Added .light .glass CSS override with subtle box-shadow values. The dark-mode .glass class uses heavy inset/outer shadows (rgba(0,0,0,0.85)) that look harsh in light mode. The override uses gentle 0.08/0.06 opacity shadows.
  • Card: Compliance Trestle (OSCAL) (trestle_scan) #4266 — Compliance Trestle card flickers during loading: Changed useTrestle hook to buffer all cluster check results and apply a single state update at the end, instead of streaming per-cluster results that caused the card to re-render with intermediate values (scores jumping, profiles appearing one by one).
  • Duplicate cancelling text in AI missions side panel #4286 — Duplicate cancelling text in AI missions side panel: Removed the "Cancelling..." badge from the MissionChat header. The status was shown in three places simultaneously: header badge, status icon label ("Cancelling..." from STATUS_CONFIG), and input area replacement ("Cancelling mission..."). Now only the status icon and input area show the cancelling state.

Fixes #4254
Fixes #4266
Fixes #4286

Test plan

  • Switch to light mode and verify card shadows are subtle, not heavy black
  • Open the Compliance Trestle card and verify it loads without flickering through intermediate score values
  • Start an AI mission, click cancel, and verify only one "Cancelling" indicator appears (in the input area)

, #4286)

- Reduce card shadow intensity in light mode by adding .light .glass override
  with subtle box-shadow values instead of the heavy dark-mode shadows
- Buffer Trestle cluster check results and apply a single state update instead
  of streaming per-cluster updates that caused the card to flicker through
  intermediate states
- Remove duplicate "Cancelling..." badge from MissionChat header since the
  status icon and input area already show the cancelling state

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Apr 2, 2026
Copilot AI review requested due to automatic review settings April 2, 2026 21:00
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mikespreitzer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@clubanderson clubanderson merged commit 0a6ec0f into main Apr 2, 2026
15 checks passed
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 35ea7c1
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69ced906313b6f000833d645
😎 Deploy Preview https://deploy-preview-4329.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow kubestellar-prow bot deleted the fix/ui-polish-batch branch April 2, 2026 21:01
@kubestellar-prow kubestellar-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

Copy link
Copy Markdown
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

Addresses three UI/UX bugs across card styling, the Compliance Trestle card loading behavior, and mission cancellation messaging.

Changes:

  • Adds a light-mode-specific .glass shadow override to reduce harsh card shadows.
  • Updates useTrestle to buffer per-cluster results and commit a single state update to avoid intermediate UI flicker.
  • Removes the extra “Cancelling...” header badge from the mission sidebar chat header.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
web/src/index.css Adds a light-mode .glass box-shadow override to soften card shadows.
web/src/hooks/useTrestle.ts Buffers Trestle cluster checks and updates state once after all checks settle.
web/src/components/layout/mission-sidebar/MissionChat.tsx Removes the cancelling badge from the header to reduce duplicate cancellation messaging.
Comments suppressed due to low confidence (1)

web/src/components/layout/mission-sidebar/MissionChat.tsx:412

  • After removing the header badge, the UI still shows cancelling text in at least two places: config.label in the header (from STATUS_CONFIG.cancelling, currently "Cancelling...") and the input area message ("Cancelling mission..."). This doesn’t match the PR description/test plan that expects only one cancelling indicator. Consider suppressing the header label for cancelling, or removing/shortening the input-area text so only one cancelling message is visible.
          <div className={cn('flex items-center gap-1', config.color)}>
            <StatusIcon className={cn('w-4 h-4', (mission.status === 'running' || mission.status === 'cancelling') && 'animate-spin')} />
            <span className="text-xs">{config.label}</span>
          </div>

Comment on lines 444 to 451
const allStatuses: Record<string, TrestleClusterStatus> = {}
let checked = 0

const tasks = (clusterNames || []).map(cluster => async () => {
const status = await fetchSingleCluster(cluster)
allStatuses[cluster] = status
if (mountedRef.current) {
// Stream each result immediately — card re-renders progressively
setStatuses(prev => ({ ...prev, [cluster]: status }))
setClustersChecked(prev => prev + 1)
// Clear initial loading after first result arrives
setIsLoading(false)
}
checked++
})
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

checked++ introduces additional outer-scope mutation inside a settledWithConcurrency task callback. This codebase has a concurrent-mutation safety scan (web/src/test/concurrent-mutation-safety.test.ts) that recommends returning values from concurrency callbacks and aggregating after the settled call to avoid interleaved writes. Consider having each task return { cluster, status } (or a tuple) and computing checked from the settled results, instead of mutating checked/allStatuses inside the callback.

Copilot uses AI. Check for mistakes.
@clubanderson
Copy link
Copy Markdown
Collaborator Author

🔄 Auto-Applying Copilot Code Review

Copilot code review found 0 code suggestion(s) and 1 general comment(s).

Also address these general comments:

  • web/src/hooks/useTrestle.ts (line 451): checked++ introduces additional outer-scope mutation inside a settledWithConcurrency task callback. This codebase ha

Push all fixes in a single commit. Run cd web && npm run build && npm run lint before committing.


Auto-generated by copilot-review-apply workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate cancelling text in AI missions side panel Card: Compliance Trestle (OSCAL) (trestle_scan) Shadows for cards in light mode

3 participants