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
+26 -16
View File
@@ -957,6 +957,8 @@ definitions:
items:
$ref: '#/definitions/compaction.Log'
type: array
total_count:
type: integer
type: object
compaction.Log:
properties:
@@ -1723,6 +1725,8 @@ definitions:
items:
$ref: '#/definitions/heartbeat.Log'
type: array
total_count:
type: integer
type: object
heartbeat.Log:
properties:
@@ -2174,6 +2178,8 @@ definitions:
items:
$ref: '#/definitions/schedule.Log'
type: array
total_count:
type: integer
type: object
schedule.ListResponse:
properties:
@@ -3173,15 +3179,16 @@ paths:
name: bot_id
required: true
type: string
- description: Before timestamp (RFC3339)
in: query
name: before
type: string
- default: 50
description: Limit
in: query
name: limit
type: integer
- default: 0
description: Offset
in: query
name: offset
type: integer
responses:
"200":
description: OK
@@ -4179,15 +4186,16 @@ paths:
name: bot_id
required: true
type: string
- description: Before timestamp (RFC3339)
in: query
name: before
type: string
- default: 50
description: Limit
in: query
name: limit
type: integer
- default: 0
description: Offset
in: query
name: offset
type: integer
responses:
"200":
description: OK
@@ -5274,15 +5282,16 @@ paths:
name: id
required: true
type: string
- description: Before timestamp (RFC3339)
in: query
name: before
type: string
- default: 50
description: Limit
in: query
name: limit
type: integer
- default: 0
description: Offset
in: query
name: offset
type: integer
responses:
"200":
description: OK
@@ -5330,15 +5339,16 @@ paths:
name: bot_id
required: true
type: string
- description: Before timestamp (RFC3339)
in: query
name: before
type: string
- default: 50
description: Limit
in: query
name: limit
type: integer
- default: 0
description: Offset
in: query
name: offset
type: integer
responses:
"200":
description: OK