Skip to content

fix: improve MySQL user display#13344

Merged
ssongliu merged 1 commit into
dev-v2from
fix/mysql-user-authorization-display
Jul 23, 2026
Merged

fix: improve MySQL user display#13344
ssongliu merged 1 commit into
dev-v2from
fix/mysql-user-authorization-display

Conversation

@ssongliu

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 23, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Improves the MySQL user/authorization UI in the frontend by making user identities clearer (username@host), improving overflow handling for sensitive/long strings (passwords), and reducing visual clutter when a user is bound to many databases.

Changes:

  • Display MySQL users as username@host in both the user drawer and authorization dialog.
  • Replace raw password rendering with a Tooltip-based overflow display to avoid layout issues with long passwords.
  • Compress the “bound databases” display to show the first DB plus a +N popover for the remainder; add a viewOnly mode to the bind dialog to hide management actions.

Reviewed changes

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

File Description
frontend/src/views/database/mysql/user/index.vue Updates user list presentation (username@host), improves password overflow display, and introduces a compact/popup database binding list with new styling.
frontend/src/views/database/mysql/bind/index.vue Updates authorized user display (username@host), improves password overflow display, and adds a viewOnly mode to hide management controls.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/views/database/mysql/user/index.vue
Comment thread frontend/src/views/database/mysql/user/index.vue
Copilot AI review requested due to automatic review settings July 23, 2026 03:39
@ssongliu
ssongliu force-pushed the fix/mysql-user-authorization-display branch from b50dad9 to c07078e Compare July 23, 2026 03:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comments suppressed due to low confidence (2)

frontend/src/views/database/mysql/user/index.vue:90

  • Using a fixed :width="120" for overrides its built-in width estimation (based on visible buttons) and will likely force the action buttons to wrap/truncate. Prefer minWidth so the component can still size itself to fit the operations while keeping a minimum constraint.
            <fu-table-operations
                :width="120"
                :buttons="userButtons"
                :label="$t('commons.table.operate')"
                fixed="right"
                fix
            />

frontend/src/views/database/mysql/user/index.vue:68

  • Same potential key-collision issue here: concatenating username + host + item without separators can produce duplicate keys. Use a delimiter-based key.
                                <el-tooltip
                                    v-for="item in userDatabases(row)"
                                    :key="row.username + row.host + item"
                                    :content="item"

Comment thread frontend/src/views/database/mysql/user/index.vue
Copilot AI review requested due to automatic review settings July 23, 2026 06:38
@ssongliu
ssongliu force-pushed the fix/mysql-user-authorization-display branch from c07078e to 4e8bdc9 Compare July 23, 2026 06:38
@ssongliu
ssongliu force-pushed the fix/mysql-user-authorization-display branch from 4e8bdc9 to cfe3534 Compare July 23, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comments suppressed due to low confidence (2)

frontend/src/views/database/mysql/user/index.vue:52

  • This :key is built by concatenating multiple dynamic values without a separator between host and item, which can produce collisions (different tuples yielding the same string) and break Vue's list diffing. Use a template literal with an explicit delimiter between segments.
                            :key="row.username + '@' + row.host + item"

frontend/src/views/database/mysql/user/index.vue:67

  • Same key-collision risk as above: concatenating host and item without a delimiter can produce duplicate keys. Use an explicit delimiter (e.g., host:item).
                                    :key="row.username + '@' + row.host + item"

Comment on lines 84 to 86
<fu-table-operations
:min-width="100"
:width="120"
:buttons="userButtons"
return host === '%' ? i18n.global.t('database.permissionAll') : host;
const result = new Map<string, string[]>();
for (const [key, databases] of databaseSets) {
result.set(key, Array.from(databases));
@ssongliu
ssongliu merged commit 0c046ed into dev-v2 Jul 23, 2026
3 checks passed
@ssongliu
ssongliu deleted the fix/mysql-user-authorization-display branch July 23, 2026 06:44
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