Skip to content

fix: misc ui fixes#1029

Merged
amhsirak merged 10 commits into
developfrom
ui-changes
Apr 10, 2026
Merged

fix: misc ui fixes#1029
amhsirak merged 10 commits into
developfrom
ui-changes

Conversation

@amhsirak
Copy link
Copy Markdown
Member

@amhsirak amhsirak commented Apr 10, 2026

Summary by CodeRabbit

  • Style & UI Improvements
    • Refined dialog layouts and visual styling for more consistent sizing, spacing and headings across informational panels.
    • Adjusted spacing and typography in menu controls and tab areas for cleaner presentation.
    • Updated AI Mode helper text to: "Describe the task. Maxun builds it for you."

@amhsirak amhsirak marked this pull request as draft April 10, 2026 11:36
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 94248bb5-d348-4383-8c0f-ee7996fe2ea6

📥 Commits

Reviewing files that changed from the base of the PR and between 0083c98 and 60f0f50.

📒 Files selected for processing (2)
  • src/components/dashboard/MainMenu.tsx
  • src/components/robot/pages/RobotCreate.tsx

Walkthrough

Replaced two Material UI Modal usages with Dialog components in MainMenu.tsx, restructuring internals to use DialogTitle/DialogContent and setting sizing via maxWidth/fullWidth and PaperProps; updated static helper text in RobotCreate.tsx to reference the product name "Maxun".

Changes

Cohort / File(s) Summary
Dialog refactor - Main menu
src/components/dashboard/MainMenu.tsx
Replaced two Modal components with Dialog, added maxWidth/fullWidth, set PaperProps.sx for fixed width and borderRadius, and moved content from absolutely-positioned Box into DialogTitle/DialogContent. Minor JSX formatting changes around Tabs, icons, and the "Star On GitHub" section.
Copy update - Robot create
src/components/robot/pages/RobotCreate.tsx
Changed AI Mode helper text from "Describe the task. It builds it for you." to "Describe the task. Maxun builds it for you." No logic or state changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • fix: misc ui fixes #1029: Makes the same Modal→Dialog changes in src/components/dashboard/MainMenu.tsx and the identical helper-text update in RobotCreate.tsx.
  • feat: main layout revamp #865: Adjusts sidebar/Paper sizing and touches MainMenu.tsx, related to dialog sizing/layout changes.
  • fix: spn link #830: Modifies the Sponsor modal in MainMenu.tsx, overlapping with the dialog refactor for sponsor content.

Suggested labels

Type: Bug, Scope: UI/UX

Suggested reviewers

  • amhsirak

Poem

🐰 Hop, hop — dialogs lined in a row,
Rounded edges glow where modals used to go.
Tabs and stars now nest with care,
"Maxun" whispers helper text in the air.
A little rabbit cheers the tidy menu flare.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: misc ui fixes' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes made. Consider a more specific title such as 'refactor: replace Modal with Dialog components in MainMenu' or 'fix: update UI helper text and modal components' to better reflect the actual changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ui-changes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@amhsirak amhsirak marked this pull request as ready for review April 10, 2026 16:43
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/dashboard/MainMenu.tsx`:
- Around line 187-191: Replace the hard-coded pixel widths in the Dialog
PaperProps sx (the objects containing borderRadius and width) with a responsive
pattern: set width: '100%' and add maxWidth: 400 (for the first occurrence) and
maxWidth: 600 (for the second) so the Dialog scales on narrow viewports; also
ensure the Dialog component uses the fullWidth prop so fullWidth and
PaperProps.sx width: '100%' work together. Locate the PaperProps objects in
MainMenu.tsx (the sx objects that currently have borderRadius and width) and
update width and add maxWidth accordingly.
- Around line 182-195: Add an accessible title to the documentation dialog by
adding a DialogTitle and wiring aria-labelledby on the Dialog; update the Dialog
that uses docModalOpen and setDocModalOpen (the Dialog component near the
docModalOpen state) to include a DialogTitle (e.g., "Documentation") and set
Dialog's aria-labelledby to the DialogTitle id, and remove the unnecessary "??
false" fallback since docModalOpen is a boolean from useState(false).
🪄 Autofix (Beta)

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c5012d7e-10dd-42dd-b3fb-d89edfc415fc

📥 Commits

Reviewing files that changed from the base of the PR and between bd818a5 and 0083c98.

📒 Files selected for processing (2)
  • src/components/dashboard/MainMenu.tsx
  • src/components/robot/pages/RobotCreate.tsx

Comment on lines +182 to 195
<Dialog
open={docModalOpen ?? false}
onClose={() => setDocModalOpen(false)}
maxWidth="xs"
fullWidth
PaperProps={{
sx: {
borderRadius: 2,
width: 400
}
}}
>
<DialogContent>
<Stack spacing={2}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cd /tmp && find . -type f -name "MainMenu.tsx" 2>/dev/null | head -5

Repository: getmaxun/maxun

Length of output: 40


🏁 Script executed:

git ls-files | grep -i "mainmenu"

Repository: getmaxun/maxun

Length of output: 95


🏁 Script executed:

cat -n src/components/dashboard/MainMenu.tsx | sed -n '175,220p'

Repository: getmaxun/maxun

Length of output: 1845


🏁 Script executed:

cat -n src/components/dashboard/MainMenu.tsx | sed -n '275,295p'

Repository: getmaxun/maxun

Length of output: 730


🏁 Script executed:

wc -l src/components/dashboard/MainMenu.tsx

Repository: getmaxun/maxun

Length of output: 99


🏁 Script executed:

rg "Dialog\|DialogTitle\|DialogContent" src/components/dashboard/MainMenu.tsx -A 2

Repository: getmaxun/maxun

Length of output: 40


🏁 Script executed:

grep -n "aria-label\|aria-labelledby" src/components/dashboard/MainMenu.tsx

Repository: getmaxun/maxun

Length of output: 40


🏁 Script executed:

cat -n src/components/dashboard/MainMenu.tsx | grep -E "Dialog|aria-" | head -20

Repository: getmaxun/maxun

Length of output: 504


🏁 Script executed:

# Check if there are any other Dialog components in the file
rg "Dialog" src/components/dashboard/MainMenu.tsx -c

Repository: getmaxun/maxun

Length of output: 60


🏁 Script executed:

# Find other Dialog usages in the codebase to see patterns
fd -e tsx -e ts -e jsx -e js | xargs grep -l "Dialog" | head -10 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 3 "Dialog" {} | head -20'

Repository: getmaxun/maxun

Length of output: 2769


🏁 Script executed:

# Check how docModalOpen state is initialized
cat -n src/components/dashboard/MainMenu.tsx | sed -n '1,50p' | grep -E "docModalOpen|sponsorModalOpen|useState"

Repository: getmaxun/maxun

Length of output: 390


🏁 Script executed:

# Search for state declarations in the component
rg "useState|docModalOpen|sponsorModalOpen" src/components/dashboard/MainMenu.tsx -B 2 -A 2

Repository: getmaxun/maxun

Length of output: 782


Add an accessible name for the documentation dialog.

The dialog at line 182 has no DialogTitle, leaving it without an accessible label for screen readers. Add DialogTitle and wire aria-labelledby to match.

Also, the ?? false on line 183 is unnecessary since docModalOpen is always a boolean from useState(false).

Suggested fix
             <Dialog
-              open={docModalOpen ?? false}
+              open={docModalOpen}
               onClose={() => setDocModalOpen(false)}
+              aria-labelledby="documentation-dialog-title"
               maxWidth="xs"
               fullWidth
               PaperProps={{
                 sx: {
                   borderRadius: 2,
                   width: 400
                 }
               }}
             >
+              <DialogTitle id="documentation-dialog-title">Documentation</DialogTitle>
               <DialogContent>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/dashboard/MainMenu.tsx` around lines 182 - 195, Add an
accessible title to the documentation dialog by adding a DialogTitle and wiring
aria-labelledby on the Dialog; update the Dialog that uses docModalOpen and
setDocModalOpen (the Dialog component near the docModalOpen state) to include a
DialogTitle (e.g., "Documentation") and set Dialog's aria-labelledby to the
DialogTitle id, and remove the unnecessary "?? false" fallback since
docModalOpen is a boolean from useState(false).

Comment on lines +187 to +191
PaperProps={{
sx: {
borderRadius: 2,
width: 400
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, locate and examine the MainMenu.tsx file
find . -name "MainMenu.tsx" -type f

Repository: getmaxun/maxun

Length of output: 97


🏁 Script executed:

# Get the file content with line numbers around the specified lines
cat -n src/components/dashboard/MainMenu.tsx | sed -n '180,200p'
cat -n src/components/dashboard/MainMenu.tsx | sed -n '275,295p'

Repository: getmaxun/maxun

Length of output: 1521


🏁 Script executed:

# Also check the overall structure to understand component usage
wc -l src/components/dashboard/MainMenu.tsx

Repository: getmaxun/maxun

Length of output: 99


Use responsive width pattern for Dialogs to prevent mobile overflow.

Lines 187-191 and 282-286 set hard-coded widths (width: 400 and width: 600) that conflict with the fullWidth prop and will cause overflow on narrow viewports. Replace with width: '100%' paired with maxWidth to allow the Dialog to scale responsively while maintaining size constraints.

Suggested fix
               PaperProps={{
                 sx: {
                   borderRadius: 2,
-                  width: 400
+                  width: '100%',
+                  maxWidth: 400
                 }
               }}
...
         PaperProps={{
           sx: {
             borderRadius: 2,
-            width: 600
+            width: '100%',
+            maxWidth: 600
           }
         }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/dashboard/MainMenu.tsx` around lines 187 - 191, Replace the
hard-coded pixel widths in the Dialog PaperProps sx (the objects containing
borderRadius and width) with a responsive pattern: set width: '100%' and add
maxWidth: 400 (for the first occurrence) and maxWidth: 600 (for the second) so
the Dialog scales on narrow viewports; also ensure the Dialog component uses the
fullWidth prop so fullWidth and PaperProps.sx width: '100%' work together.
Locate the PaperProps objects in MainMenu.tsx (the sx objects that currently
have borderRadius and width) and update width and add maxWidth accordingly.

@amhsirak amhsirak merged commit 6442159 into develop Apr 10, 2026
1 check was pending
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