Skip to content

Dashboard Draft filter does not sync with Jobs tab & view mode (list/gallery) is not persisted after refresh #51

@ntuan2502

Description

@ntuan2502

Summary

There are two related UI state issues:

  1. When clicking Draft from the Dashboard (Jobs summary widget), the URL correctly updates to:
 /dashboard/jobs?status=draft

However, the Jobs page does not activate/select the Draft tab, even though the status=draft query param is present.

  1. The selected view mode (List view / Gallery view) is not persisted in the URL. After selecting Gallery view and refreshing (F5), the page resets back to the default List view.

Both issues break expected state synchronization between UI and URL.

Suggested improvement

  1. Sync tab selection with status query param:
  • ?status=draft → activate Draft tab
  • ?status=open → activate Open tab
  • etc.
  1. Add view query param for display mode:
  • ?view=list
  • ?view=gallery
  1. Combine state example:
/dashboard/jobs?status=draft&view=gallery

This ensures:

  • Deep linking works correctly
  • Page state survives refresh
  • URL reflects UI state

Steps to reproduce

Issue 1 – Draft filter not synced

  1. Go to /dashboard
  2. In the Jobs summary widget, click Draft
  3. You are redirected to:
/dashboard/jobs?status=draft
  1. Observe the Jobs page tabs

Issue 2 – View mode not persisted

  1. Go to /dashboard/jobs
  2. Switch to Gallery view
  3. Press F5 (refresh)
  4. Observe the selected view mode

Expected behavior

Issue 1

  • The Draft tab should be active
  • The job list should reflect status=draft
  • The selected tab should be derived from the status query parameter

Issue 2

  • View mode should be persisted via query param, e.g.:
/dashboard/jobs?view=gallery
  • After refresh, Gallery view should remain active

Actual behavior

Issue 1

  • The URL contains ?status=draft
  • But the All tab (or default tab) remains selected
  • UI state does not reflect query parameter

Issue 2

  • After refresh, the page resets to default List view
  • View mode is not stored in URL or persisted state

Version / commit

No response

Environment

No response

Logs / screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions