Skip to content

Time-Travel UI Prototype (Temporal Context Layer)#16

Open
KinshukSS2 wants to merge 7 commits into
istSOS:mainfrom
KinshukSS2:feature/time-travel-prototype-gsoc
Open

Time-Travel UI Prototype (Temporal Context Layer)#16
KinshukSS2 wants to merge 7 commits into
istSOS:mainfrom
KinshukSS2:feature/time-travel-prototype-gsoc

Conversation

@KinshukSS2
Copy link
Copy Markdown

@KinshukSS2 KinshukSS2 commented Mar 17, 2026

Time-Travel UI Prototype (Temporal Context Layer)

Summary

This PR implements a complete time-travel prototype inside the existing istSOS4 GUI architecture.
It introduces a temporal domain model that propagates consistently through UI state, URL parameters, query generation, and temporal UX feedback.

Why

This work delivers the GSoC time-travel prototype directly in the real app structure, proving:

  • temporal state propagation across screens,
  • correct temporal query generation for API calls,
  • and clear user-facing temporal context/warnings.

What Changed

1) Temporal state management with URL sync

  • Added temporal state model (current, as_of, from_to) in shared context.
  • Synced temporal state with URL query params so state is shareable and persists on navigation/refresh.
  • Added guard logic to avoid unnecessary re-renders and update loops.

2) Temporal API query support

  • Extended query composition to append temporal parameters ($as_of, $from_to) automatically.
  • Added active query visibility in UI so users can see the exact request generated by selected temporal mode.

3) Temporal UX components

  • Added temporal mode switch with date-time inputs.
  • Added persistent temporal badge in navbar for active context visibility.
  • Added temporal conflict warning for “no entity at selected time” scenarios.
  • Added phantom edit warning on Datastreams for fields not versioned by temporal history.

4) Page integrations

  • Integrated temporal behavior into Things page.
  • Integrated temporal behavior into Datastreams page.
  • Added/updated Commits explorer flow so UPDATE actions can set as_of and navigate into Things temporal view.

5) Mock temporal API and prototype coverage

  • Added mock temporal API endpoints for prototype behavior and deterministic demo data.
  • Added prototype-level history/commit/activity support where required by temporal exploration flow.

6) Test coverage

  • Added/maintained unit tests for temporal context and temporal UI behavior.
  • Verified temporal prototype paths compile and execute without errors.

Verification

Run:

npm run lint
npm run test
npm run build

Result:

  • lint passes
  • tests pass
  • build passes

Manual Checklist

  • Temporal badge is visible in top bar.
  • Temporal mode switch works on Things and Datastreams.
  • API query preview reflects selected temporal mode.
  • Conflict warning appears for empty temporal results.
  • Phantom warning appears on Datastreams in temporal mode.
  • Commits UPDATE action navigates to Things and sets as_of.

Follow-ups

  • Replace mock temporal API routes with live backend integration where needed.
  • Add end-to-end tests for temporal navigation and state persistence.

@KinshukSS2 KinshukSS2 marked this pull request as draft March 17, 2026 18:24
@KinshukSS2 KinshukSS2 marked this pull request as ready for review March 17, 2026 18:36
@KinshukSS2 KinshukSS2 force-pushed the feature/time-travel-prototype-gsoc branch from 1b6ae3b to d06a983 Compare March 29, 2026 14:36
@KinshukSS2 KinshukSS2 force-pushed the feature/time-travel-prototype-gsoc branch from d06a983 to 714dd87 Compare March 29, 2026 14:39
- Extract shared COMMITS, SNAPSHOTS, ENTITY_TYPES into data.ts
- Add buildActivityBuckets() that filters by entityType, $as_of, $from_to
- Activity route delegates to shared pure function
- History route imports from shared module (no logic change)
- Frontend passes temporal params to activity endpoint via appendTemporalParams
- Add 11 unit tests covering all filter combinations (18/18 total passing)
- Keep zero-count fallback for empty filter results

Resolves: ISSUE_01 — History activity API ignores temporal/entity context
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.

1 participant