improvement(logs): update logs export route to respect filters#2550
Merged
waleedlatif1 merged 1 commit intostagingfrom Dec 23, 2025
Merged
improvement(logs): update logs export route to respect filters#2550waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryFixed logs export to respect time range and other filters by extracting shared filter logic into a centralized module. The export route previously had filter parameters defined but didn't apply time range filters correctly, causing exports to ignore user-selected time windows. Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant LogsUI as Logs UI
participant ExportAPI as /api/logs/export
participant ListAPI as /api/logs
participant Filters as lib/logs/filters
participant DB as Database
Note over User,DB: Log Export Flow (Fixed)
User->>LogsUI: Click export with filters
LogsUI->>LogsUI: getStartDateFromTimeRange(timeRange)
LogsUI->>ExportAPI: GET /api/logs/export?startDate=...&level=...&workflowIds=...
ExportAPI->>Filters: LogFilterParamsSchema.parse(params)
ExportAPI->>Filters: buildFilterConditions(params)
Filters-->>ExportAPI: SQL conditions (with time range!)
ExportAPI->>DB: SELECT with all filters applied
DB-->>ExportAPI: Filtered logs
ExportAPI-->>User: CSV file download
Note over User,DB: Log List Flow
User->>ListAPI: GET /api/logs?startDate=...&level=...
ListAPI->>Filters: LogFilterParamsSchema.parse(params)
ListAPI->>ListAPI: Build advanced level conditions (running/pending)
ListAPI->>Filters: buildFilterConditions(params, {useSimpleLevelFilter: false})
Filters-->>ListAPI: SQL conditions (excluding level)
ListAPI->>DB: SELECT with combined conditions
DB-->>ListAPI: Filtered logs
ListAPI-->>User: JSON response
|
waleedlatif1
added a commit
that referenced
this pull request
Dec 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist