Skip to content

Commit b459ddd

Browse files
author
Murtaza Nsair
committed
Change activity log pagination to 1000 logs per page instead of 100
1 parent 8daddb2 commit b459ddd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

maestro_backend/api/missions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ async def get_mission_notes(
660660
async def get_mission_logs(
661661
mission_id: str,
662662
skip: int = Query(0, ge=0, description="Number of records to skip"),
663-
limit: int = Query(100, ge=1, le=10000, description="Number of records to return"),
663+
limit: int = Query(1000, ge=1, le=10000, description="Number of records to return"),
664664
current_user: User = Depends(get_current_user_from_cookie),
665665
context_mgr: ContextManager = Depends(get_context_manager),
666666
db: Session = Depends(get_db)

maestro_backend/api/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class MissionLogs(BaseModel):
279279
total: int = 0
280280
has_more: bool = False
281281
skip: int = 0
282-
limit: int = 100
282+
limit: int = 1000
283283

284284
class MissionDraft(BaseModel):
285285
mission_id: str

maestro_frontend/src/features/mission/components/ResearchPanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ export const ResearchPanel: React.FC = () => {
4242
}
4343

4444
try {
45-
// Fetch initial batch of logs with pagination support
46-
const response = await apiClient.get(`/api/missions/${activeChat.missionId}/logs?skip=0&limit=100`)
45+
// Fetch initial batch of logs with pagination support (1000 at a time)
46+
const response = await apiClient.get(`/api/missions/${activeChat.missionId}/logs?skip=0&limit=1000`)
4747
if (response.data && response.data.logs) {
4848
const persistentLogs = response.data.logs.map((log: any) => ({
4949
...log,
@@ -79,7 +79,7 @@ export const ResearchPanel: React.FC = () => {
7979
const currentLogs = missionLogs[activeChat.missionId] || []
8080
const skip = currentLogs.length
8181

82-
const response = await apiClient.get(`/api/missions/${activeChat.missionId}/logs?skip=${skip}&limit=100`)
82+
const response = await apiClient.get(`/api/missions/${activeChat.missionId}/logs?skip=${skip}&limit=1000`)
8383
if (response.data && response.data.logs) {
8484
const newLogs = response.data.logs.map((log: any) => ({
8585
...log,

0 commit comments

Comments
 (0)