Skip to content

refactor: centralize frontend orchestration and workspace lifecycle management#150

Open
vraj826 wants to merge 5 commits into
siddu-k:mainfrom
vraj826:feature/frontend-orchestration-stability-layer
Open

refactor: centralize frontend orchestration and workspace lifecycle management#150
vraj826 wants to merge 5 commits into
siddu-k:mainfrom
vraj826:feature/frontend-orchestration-stability-layer

Conversation

@vraj826
Copy link
Copy Markdown
Contributor

@vraj826 vraj826 commented May 28, 2026

Fixes issue #111

Fixes this issue

This PR stabilizes DevShell’s growing frontend orchestration layer by reducing duplicated async logic, centralizing modal/event lifecycle handling, and improving workspace/session synchronization flows.

It addresses issues around:

  • duplicated persistence logic
  • inconsistent async handling
  • fragile modal/event orchestration
  • repeated fetch/error handling patterns
  • terminal/workspace synchronization instability

Changes made

  • Added lightweight shared frontend helpers for:

    • async fetch handling
    • POST requests
    • loading states
    • modal open/close handling
    • safe DOM access
    • debounced persistence
  • Consolidated duplicated logic for:

    • session persistence
    • workspace restoration
    • replay restoration
    • terminal restoration
    • terminal clearing
  • Reused a unified terminal builder across:

    • new terminals
    • workspace restore
    • session restore
  • Centralized modal lifecycle management and overlay close handling

  • Stabilized workspace restore actions to avoid duplicate listeners

  • Improved terminal/workspace synchronization

  • Removed duplicated lifecycle cleanup blocks

Testing and validation

Tested:

  • workspace recovery and restore flows
  • replay/history integration
  • reliability dashboard lifecycle
  • modal open/close stability
  • terminal synchronization
  • repeated restore/reopen workflows

Validation:

  • node --check ui/app.js passed
  • verified no duplicate modal/event listener behavior
  • verified workspace/session persistence stability after reloads

Screenshots and logs

Workspace recovery orchestration

Screenshot 2026-05-28 190945

Checklist

  • No breaking changes
  • Tests added or updated
  • Documentation added or updated
  • Branch is up to date with main

@vraj826
Copy link
Copy Markdown
Contributor Author

vraj826 commented May 28, 2026

@siddu-k Can you review the changes made in this PR!

@vraj826
Copy link
Copy Markdown
Contributor Author

vraj826 commented May 31, 2026

@siddu-k Please review the changes!

@siddu-k
Copy link
Copy Markdown
Owner

siddu-k commented May 31, 2026

@vraj826 conflict

@vraj826
Copy link
Copy Markdown
Contributor Author

vraj826 commented May 31, 2026

@siddu-k Resolved the conflicts, now you can review!

@vraj826 vraj826 closed this May 31, 2026
@vraj826 vraj826 deleted the feature/frontend-orchestration-stability-layer branch May 31, 2026 15:01
@vraj826 vraj826 restored the feature/frontend-orchestration-stability-layer branch May 31, 2026 17:00
@vraj826 vraj826 reopened this May 31, 2026
@vraj826
Copy link
Copy Markdown
Contributor Author

vraj826 commented May 31, 2026

@siddu-k Branch was deleted locally from my forked repo by mistake, I have restored it, now the changes for it can be reviewed.

@vraj826
Copy link
Copy Markdown
Contributor Author

vraj826 commented Jun 1, 2026

@siddu-k I've resolved the conflicts.

@vraj826
Copy link
Copy Markdown
Contributor Author

vraj826 commented Jun 3, 2026

@siddu-k Any updates?!

@vraj826
Copy link
Copy Markdown
Contributor Author

vraj826 commented Jun 5, 2026

@siddu-k I have again resolved the conflicts, can you review it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants