Skip to content

Conversation

Copy link

Copilot AI commented Jan 26, 2026

Enables linking to serilog-ui with pre-applied filters via URL query parameters. Previously, filter state existed only in-memory and was lost on page reload. External systems and team members can now share direct links to specific logs or timeframes.

Changes

Core Implementation

  • queryParams.ts: Parser/serializer for URL ↔ SearchForm conversion with validation
    • Supports parameter aliases (from/startDate, to/till/endDate, key/table)
    • Omits default values for clean URLs
  • useQueryParamSync.ts: React hook for bidirectional form ↔ URL sync
    • Initializes filters from URL on mount
    • Updates URL on form changes with ref-based deduplication to prevent infinite loops
  • Index.tsx: Enabled sync hook

Tests

  • 12 unit tests covering parse/serialize edge cases and validation

Documentation

  • README section with parameter reference and examples

Example Usage

# Link to errors in specific timeframe
/serilog-ui?level=Error&startDate=2024-01-25T00:00:00Z&endDate=2024-01-26T00:00:00Z

# Link to specific table with search
/serilog-ui?table=ProductionLogs&search=payment

# URLs update automatically as filters change

Supported parameters: table/key, level, search, startDate/from, endDate/to/till, sortOn, sortBy, page, count/entriesPerPage

Original prompt

This section details on the original issue you should resolve

<issue_title>Query parameters for the filtervalues</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.

We also have an external system showing debug info, and it would be cool to be able to generate a link to serilog-ui for specific logs or timeframes so we can have minimal and easy 'integration'.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Allow for the filter options to be set by query parameters, for example;

/serilog-ui?q={table: '...', fromDt: ..., tillDt: ...}

In that sample you'd just load a filters object in the frontend and bob's your uncle.

Else you can map query params;
/serilog-ui?from=...&till=...

It'd be nice to be able to link to individual log lines via a trace id or something - but that'd be a second step.
Above should be low-effort.

The FE could also actively set the query params so that sharing would be easy between devs.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

There is no alternative to link to a certain log line or timeframe at this time

Additional context
Add any other context or screenshots about the feature request here.
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add query parameters for filter values in serilog-ui Add query parameter support for filter deep-linking Jan 26, 2026
Copilot AI requested a review from mo-esmp January 26, 2026 07:37
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.

Query parameters for the filtervalues

2 participants