Skip to content

fix: UX and dev mode improvements - #18

Open
gmenher wants to merge 1 commit into
Gkrumbach07:mainfrom
gmenher:fix/ux-dev-mode-fixes
Open

fix: UX and dev mode improvements#18
gmenher wants to merge 1 commit into
Gkrumbach07:mainfrom
gmenher:fix/ux-dev-mode-fixes

Conversation

@gmenher

@gmenher gmenher commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Jira: RHOAIENG-83129

Summary

Fixes the About modal text wrapping issue found during initial review.

About modal text wrapping

Labels like "Dashboard version" were wrapping mid-word at narrow widths.

Fix: Changed DescriptionList to use isAutoFit with autoFitMinModifier so items reflow responsively.


Note: This PR originally addressed three issues (terminal CORS, gRPC error extraction, and About modal). The scope has been reduced because:

Only the About modal fix remains.

Testing

  • Manual: About modal renders labels without mid-word wrapping at narrow viewports.

Comment thread backend/cmd/server/main.go Outdated
Comment thread backend/internal/api/respond.go Outdated
Comment thread backend/internal/api/respond.go Outdated
Comment thread backend/internal/api/respond.go Outdated
Comment thread backend/internal/api/respond.go Outdated
Comment thread backend/internal/api/respond.go Outdated
Comment thread backend/internal/api/respond.go Outdated
gmenher added a commit to gmenher/openshell-dashboard that referenced this pull request Aug 6, 2026
Address review feedback on Gkrumbach07#18:

1. ALLOWED_ORIGINS: Keep default empty (preserves same-origin fallback
   in production). Auto-add http://localhost:3000 only when
   AUTH_DISABLED=true, so make dev works out of the box without breaking
   deployments that rely on the same-origin WebSocket check.

2. gRPC error extraction: Replace fragile sanitizeGrpcMessage (regex +
   colon-splitting heuristic) with errors.As + GRPCStatus() interface.
   This extracts the original clean gateway message directly, bypassing
   status.FromError's behavior of replacing the message with the full
   fmt.Errorf wrapper chain (grpc-go v1.82+). No stripping heuristic
   needed — the source is clean from the start.

3. Add test coverage: TestWriteGrpcErrorWrapped covers the real scenario
   (gateway layer wraps gRPC errors with fmt.Errorf). Verifies that
   short messages ('not found', 'denied') and long messages are all
   extracted cleanly regardless of wrapper context.

4. About modal: Use isAutoFit with autoFitMinModifier for responsive
   layout without mid-word wrapping.
@gmenher
gmenher force-pushed the fix/ux-dev-mode-fixes branch from 892a959 to 516da0c Compare August 6, 2026 13:20
@Gkrumbach07

Copy link
Copy Markdown
Owner

Hey @gmenher — this needs a rebase onto current main. PR #29 removed CORS/ALLOWED_ORIGINS entirely, so the main.go change is no longer needed. The other two fixes (gRPC error extraction via errors.As + About modal isAutoFit) still apply cleanly and are good to go.

To rebase:

  1. Drop the main.go hunk (CORS auto-add is obsolete)
  2. Rebase respond.go, respond_ext_test.go, and AppLayout.tsx onto main
  3. The gRPC fix and About modal fix apply without conflicts

@gmenher
gmenher force-pushed the fix/ux-dev-mode-fixes branch from 516da0c to 816eaae Compare August 9, 2026 18:23
Use isAutoFit with autoFitMinModifier on the DescriptionList so items
reflow responsively instead of breaking labels mid-word at narrow widths.
@gmenher
gmenher force-pushed the fix/ux-dev-mode-fixes branch from 816eaae to 0a1c6f2 Compare August 11, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants