Skip to content

Conversation

@maany
Copy link
Member

@maany maany commented Jan 21, 2026

Changes

State Comparators

  • Add ruleStateComparator: Sorts rule states by priority (STUCK > SUSPENDED > REPLICATING > WAITING_APPROVAL > INJECT > OK > UNKNOWN)
  • Add lockStateComparator: Sorts lock states by priority (ERROR > STUCK > REPLICATING > OK > UNKNOWN)
  • Add remainingLifetimeComparator: Numeric sorting for remaining lifetime values (applied to DID rules table)

Tables Updated

  • Rules List: Default sort by state, showing stuck/error rules first
  • DID Rules Table: Default sort by state, added remaining lifetime numeric sorting
  • Rule Locks Table: Default sort by state, showing error/stuck locks first

DID Search Panel

  • Fix arrow key navigation in scope/name input fields
  • Arrow keys now move cursor within the current field during typing
  • Only switch between fields when cursor is at edge position (right arrow at end of scope, left arrow at beginning of name)

Benefits

  • Error and stuck states appear first in all rule tables
  • Users can quickly identify problematic rules and replicas
  • Consistent sorting behavior across all rule-related tables
  • Numeric sorting for time values (19 hours sorts before 5 days)
  • Natural text input behavior with arrow keys in DID search

Closes

maany added 2 commits January 21, 2026 15:34
Add state comparators and default sorting for all rule tables:

- Add ruleStateComparator: STUCK > SUSPENDED > REPLICATING > WAITING_APPROVAL > INJECT > OK > UNKNOWN
- Add lockStateComparator: ERROR > STUCK > REPLICATING > OK > UNKNOWN
- Apply to Rules List table (state sort by default)
- Apply to DID Rules table (state sort by default, add remaining lifetime sort)
- Apply to Rule Locks table (state sort by default)

This ensures error and stuck states appear first across all tables,
helping users quickly identify problematic rules and replicas.
- Arrow keys now move cursor within input field
- Only switch between fields when cursor is at edge position
- Right arrow switches from scope to name when at end of text
- Left arrow switches from name to scope when at beginning
@maany maany merged commit 3cc9e4d into master Jan 21, 2026
8 checks passed
@maany maany deleted the sorting-improvements branch January 21, 2026 14:55
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.

Enable sorting by lock states in rule tables

2 participants