Skip to content

feat: add input history, ID-based sorting, and loading states to comparator#31

Merged
Ahmedhossamdev merged 4 commits into
mainfrom
feat/comparator-enhancements-sorting-history
Mar 30, 2026
Merged

feat: add input history, ID-based sorting, and loading states to comparator#31
Ahmedhossamdev merged 4 commits into
mainfrom
feat/comparator-enhancements-sorting-history

Conversation

@Ahmedhossamdev

Copy link
Copy Markdown
Member

Fix: #30

Summary

  • Add URL and input parameter history with localStorage persistence
  • Implement "Sort by ID" feature to align matching items in diff viewer
  • Add loading overlay for large data processing
  • Add new Trip endpoint and scheduleRelationship search support

Changes

ComparatorPanel.svelte

  • Persist server URLs to history (last 5 URLs each)
  • Persist parameter input values with endpoint-specific keys
  • Display datalist dropdowns for URL and parameter suggestions
  • Show loading overlay when processing large responses (>500KB)

DiffViewer.svelte

  • Add "Sort by ID" button to sort arrays by ID fields
  • Match items across both sides by ID for aligned comparison
  • Toggle between sorted and original view

JsonTree.svelte

  • Reduced initial root chunk size for better performance

ProtobufViewer.svelte

  • Display scheduleRelationship badge in trip info

endpoints.ts

  • Add new Trip endpoint

jsonCompare.ts

  • Add ID field detection and sorting utilities
  • Add sortById, findIdValue, sortTopLevelArrays, matchArraysById functions
  • Update existing sort calls to use ID-based sorting

@Ahmedhossamdev Ahmedhossamdev merged commit 6527b4b into main Mar 30, 2026
2 checks passed
@Ahmedhossamdev Ahmedhossamdev deleted the feat/comparator-enhancements-sorting-history branch June 2, 2026 00:56
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.

feat: comparator with input history, ID-based sorting, and loading states

1 participant