Skip to content

UI: Fix table action buttons and login flash#10

Merged
HudsonGraeme merged 2 commits intodevfrom
ui/general-improvements
Mar 16, 2026
Merged

UI: Fix table action buttons and login flash#10
HudsonGraeme merged 2 commits intodevfrom
ui/general-improvements

Conversation

@HudsonGraeme
Copy link
Copy Markdown
Owner

@HudsonGraeme HudsonGraeme commented Mar 16, 2026

Summary

  • Replace unstyled btn-icon/btn-edit/btn-delete SVG icon buttons with existing themed action-btn-sm text buttons (EDIT/DELETE)
  • Add action-btn-sm.danger hover style for delete buttons (red border/text on hover)
  • Start login-view with hidden class to prevent flash of login screen while async auth check runs on reload

Test plan

  • Navigate to Network > Interfaces and verify EDIT/DELETE buttons are visible and properly styled in each row
  • Verify delete button turns red on hover
  • Confirm action buttons work across all table views (wireless, firewall, DHCP, etc.)
  • Reload page while authenticated and confirm no login screen flash

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 16, 2026

Warning

Rate limit exceeded

@HudsonGraeme has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 21 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 72f5535d-0e75-4a43-bca2-4d7a8605c927

📥 Commits

Reviewing files that changed from the base of the PR and between 43d67b9 and b590cde.

📒 Files selected for processing (4)
  • moci/app.css
  • moci/app.js
  • moci/index.html
  • moci/js/core.js
📝 Walkthrough

Walkthrough

This pull request adds hover styling for small danger action buttons, hides the login view by default, and simplifies the action button rendering logic by removing inline SVG icons in favor of plain text labels.

Changes

Cohort / File(s) Summary
Styling Updates
moci/app.css
Added hover styling for .action-btn-sm.danger with red border, text color, and subtle glow effect.
Template Configuration
moci/index.html
Added hidden class to login-view div to hide it on page load.
Component Logic
moci/js/core.js
Simplified renderActionButtons function to return plain text EDIT and DELETE buttons instead of complex HTML with inline SVG icons.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A button needs a glow so red,
When danger hovers overhead,
The login hides, the code grows lean,
Just EDIT, DELETE on the scene,
Small tweaks that polish up the view!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'UI: Fix table action buttons and login flash' directly and clearly summarizes the main changes: improving action button styling and fixing the login view flash issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ui/general-improvements
📝 Coding Plan
  • Generate coding plan for human review comments

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.

- Replace unstyled btn-icon/btn-edit/btn-delete classes with existing action-btn-sm theme
- Add action-btn-sm.danger hover style for delete buttons
- Start login-view hidden to prevent flash while async auth check runs
@HudsonGraeme HudsonGraeme force-pushed the ui/general-improvements branch from 43d67b9 to 958465f Compare March 16, 2026 03:13
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: 1

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

Inline comments:
In `@moci/js/core.js`:
- Around line 462-465: Call site still invokes renderActionButtons with the old
three-argument signature; update that call to pass only the single id argument
(e.g., the existing section/id variable) so it matches the new
renderActionButtons(id) signature and relies on data-action attributes for
behavior; remove the two function-name arguments (editFirewallRule,
deleteFirewallRule) from the call and ensure delegateActions is used to handle
edit/delete via data-action and data-id attributes.
🪄 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: 481c7dae-9d38-4532-a03c-ba6fbc416817

📥 Commits

Reviewing files that changed from the base of the PR and between 0529ed3 and 43d67b9.

📒 Files selected for processing (3)
  • moci/app.css
  • moci/index.html
  • moci/js/core.js

@HudsonGraeme HudsonGraeme merged commit e601536 into dev Mar 16, 2026
4 checks passed
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.

1 participant