refactor: replace Load More with Pagination across frontend and backend

- Replace all "Load More" / "Show More" buttons with Pagination components
  in model-list, bot-compaction, and bot-heartbeat views
- Convert backend log APIs (compaction, heartbeat, schedule) from
  cursor-based (before+limit) to offset+limit pagination with total_count
- Update SQL queries to use OFFSET+LIMIT and add COUNT queries
- Add shared parseOffsetLimit helper in handler_helpers.go
- Regenerate sqlc, Swagger docs, and TypeScript SDK
- Clean up unused i18n keys (loadMore, showMore, history.loadMore)
This commit is contained in:
Acbox
2026-03-29 18:49:30 +08:00
parent 716123d08d
commit bcda6f6fe6
26 changed files with 469 additions and 316 deletions
+37 -24
View File
@@ -842,18 +842,19 @@
"in": "path",
"required": true
},
{
"type": "string",
"description": "Before timestamp (RFC3339)",
"name": "before",
"in": "query"
},
{
"type": "integer",
"default": 50,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"description": "Offset",
"name": "offset",
"in": "query"
}
],
"responses": {
@@ -2365,18 +2366,19 @@
"in": "path",
"required": true
},
{
"type": "string",
"description": "Before timestamp (RFC3339)",
"name": "before",
"in": "query"
},
{
"type": "integer",
"default": 50,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"description": "Offset",
"name": "offset",
"in": "query"
}
],
"responses": {
@@ -3900,18 +3902,19 @@
"in": "path",
"required": true
},
{
"type": "string",
"description": "Before timestamp (RFC3339)",
"name": "before",
"in": "query"
},
{
"type": "integer",
"default": 50,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"description": "Offset",
"name": "offset",
"in": "query"
}
],
"responses": {
@@ -4113,18 +4116,19 @@
"in": "path",
"required": true
},
{
"type": "string",
"description": "Before timestamp (RFC3339)",
"name": "before",
"in": "query"
},
{
"type": "integer",
"default": 50,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"description": "Offset",
"name": "offset",
"in": "query"
}
],
"responses": {
@@ -10204,6 +10208,9 @@
"items": {
"$ref": "#/definitions/compaction.Log"
}
},
"total_count": {
"type": "integer"
}
}
},
@@ -11377,6 +11384,9 @@
"items": {
"$ref": "#/definitions/heartbeat.Log"
}
},
"total_count": {
"type": "integer"
}
}
},
@@ -12059,6 +12069,9 @@
"items": {
"$ref": "#/definitions/schedule.Log"
}
},
"total_count": {
"type": "integer"
}
}
},