Skip to content

Optimize page layout style#488

Open
zhao365845726 wants to merge 18 commits intoDeveloper-KnowledgeBasefrom
Developer-KnowledgeBase-zmz
Open

Optimize page layout style#488
zhao365845726 wants to merge 18 commits intoDeveloper-KnowledgeBasefrom
Developer-KnowledgeBase-zmz

Conversation

@zhao365845726
Copy link
Collaborator

@zhao365845726 zhao365845726 commented Mar 1, 2026

Note

Medium Risk
Mostly UI/layout refactors across multiple admin pages, plus changes to server-side filtering for AIVector and KnowledgeBase list queries; risk is moderate due to potential mismatches between new client-side query params/pagination handlers and existing APIs.

Overview
Updates several admin list pages (AIKernel models, AIVector, KnowledgeBase, FileManager, AdminUserInfo, Menu) with a consistent layout: new keyword search bars, reorganized toolbars, updated table sizing/operation columns, and revamped pagination controls.

Refreshes dialog UX across modules (add/edit/import forms) by switching to top-aligned, compact Element-UI forms with new styling and validation/placeholder tweaks; adds large new CSS blocks to support the redesigned layouts.

Adds/adjusts data querying behavior: AIKernel model list now sends optional wildcard alias filtering with safer response/error handling and DeepSeek default endpoint handling; AIVector backend now builds LIKE %...% filters for Alias/Name; KnowledgeBase page handler re-enables keyword filtering on name. Also updates .gitignore to exclude a generated BuildXncfAppService.Generated.cs file.

Written by Cursor Bugbot for commit 1774f1c. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Free Tier Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: CSS class aside-scrollbar referenced but never defined
    • Removed the unused aside-scrollbar class from the el-scrollbar element so no dead CSS reference remains.

Create PR

Or push these changes by commenting:

@cursor push 09326610ed
Preview (09326610ed)
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/Shared/_Layout_Vue.cshtml b/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/Shared/_Layout_Vue.cshtml
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/Shared/_Layout_Vue.cshtml
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/Shared/_Layout_Vue.cshtml
@@ -31,7 +31,7 @@
                             <img src="~/images/Admin/base/head/logo_230x55.png" alt="Alternate Text" />
                         </a>
                     </div>
-                    <el-scrollbar wrap-class="scrollbar-wrapper" class="aside-scrollbar">
+                    <el-scrollbar wrap-class="scrollbar-wrapper">
                         <el-menu :default-active="Store.state.navMenu.activeMenu"
                                  :collapse="Store.state.navMenu.isCollapse"
                                  :background-color="Store.state.navMenu.variables.menuBg"
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

</a>
</div>
<el-scrollbar wrap-class="scrollbar-wrapper" style="height:calc(100vh - 80px);">
<el-scrollbar wrap-class="scrollbar-wrapper" class="aside-scrollbar">
Copy link

Choose a reason for hiding this comment

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

CSS class aside-scrollbar referenced but never defined

Low Severity

The old inline style="height:calc(100vh - 80px);" on the el-scrollbar element was replaced with class="aside-scrollbar", but no CSS rule for .aside-scrollbar exists anywhere in the codebase. The element still works because it's styled via the structural selector .app-wrapper .el-container .el-aside .el-scrollbar in layout.css, but the class name is dead code that could mislead future developers into thinking it carries styling.

Fix in Cursor Fix in Web

if (that.keyword != '' && that.keyword != undefined) {
keyword = that.keyword;
}
debugger
Copy link

Choose a reason for hiding this comment

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

Debugger statement left in production code path

High Severity

A debugger statement was newly introduced in the getList method. This method is called on page creation, every search, every pagination change, and after saves/deletes — essentially every major user interaction. Any user with browser DevTools open will have their page freeze at this breakpoint.

Fix in Cursor Fix in Web

input.setAttribute('value', key)
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, 9999)
Copy link

Choose a reason for hiding this comment

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

Old pagination handlers are now dead code

Low Severity

The handleSizeChange and handleCurrentChange methods are no longer referenced by the AIKernel template, which now binds to the newly added handlePageSizeChange and handlePageChange. These old methods are dead code that duplicates the new handlers' logic.

Fix in Cursor Fix in Web

page: {
page: 1,
size: 10
size: 8
Copy link

Choose a reason for hiding this comment

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

Default page size not in page-sizes options

Medium Severity

The default page.size was changed from 10 to 8, but the el-pagination :page-sizes array is [5, 10, 15, 20, 50, 100], which doesn't include 8. The template comment even says "默认 10". This causes the page-sizes dropdown to display an inconsistent or blank initial selection, confusing users about how many rows are shown per page.

Additional Locations (1)

Fix in Cursor Fix in Web

<el-button class="filter-item" v-has="['admin-add']" type="primary" icon="el-icon-plus" @@click="handleEdit">增加</el-button>
</div>
<div class="admin-user-info-page">
<div class="admin-user-info-main">
Copy link

Choose a reason for hiding this comment

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

Missing closing div tag for inner wrapper

Medium Severity

The admin-user-info-main div (line 16) is opened but never closed — only two </div> tags exist at the bottom (lines 157–158) for the three opened divs. The same issue exists in Role/Index.cshtml where role-main is never closed. The correct pattern (used in AIKernel/Index.cshtml) closes the inner main wrapper before placing el-dialog elements outside it. Without the closing tag, all dialogs end up inside the white-card wrapper, inheriting its padding, background, and box-shadow styles.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

return this.tableData.filter(function (row) {
return (row.fileName || '').toLowerCase().indexOf(k) >= 0;
});
}
Copy link

Choose a reason for hiding this comment

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

Client-side filtering mismatches server-side pagination total

Medium Severity

The filteredTableData computed property filters tableData client-side by keyword, but the pagination's :total still reflects the unfiltered server-side count. When a user searches, fewer rows appear in the table but the pagination displays the full total, creating a confusing mismatch. The getList method doesn't pass the keyword to the server either.

Additional Locations (1)

Fix in Cursor Fix in Web

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