Skip to content

Conversation

@Tim020
Copy link
Contributor

@Tim020 Tim020 commented Jan 30, 2026

Summary

  • Refactors 10 Vue components to use Promise.all for parallel API fetching
  • Converts sequential await chains to parallel execution where operations are independent
  • Improves page load times by running concurrent API calls instead of waiting for each to complete

Components Refactored

High Priority (Largest Impact)

Component Before After
ScriptEditor.vue 14 sequential awaits Parallel groups with .then() chains
CueEditor.vue 13 sequential awaits Parallel groups with .then() chains
ConfigMics.vue 6 sequential awaits Single Promise.all

Medium Priority

Component Changes
ConfigSystem.vue 4 independent fetches parallelized
ConfigCharacters.vue 2 independent fetches parallelized
CharacterGroups.vue 2 independent fetches parallelized
PropsList.vue 2 independent fetches parallelized
SceneryList.vue 2 independent fetches parallelized

Additional Optimizations

Component Changes
App.vue Parallelize RBAC roles with WebSocket state; parallelize user RBAC and settings
ShowLiveView.vue Parallelize session data and act list fetches

Pattern Used

Following the existing pattern from ScriptViewPane.vue:

await Promise.all([
  // Independent operations run in parallel
  this.GET_SCENE_LIST(),
  this.GET_CHARACTER_LIST(),
  // Dependent chains use .then()
  this.GET_CURRENT_USER().then(() => {
    if (this.CURRENT_USER != null) {
      return Promise.all([
        this.GET_STAGE_DIRECTION_STYLE_OVERRIDES(),
        this.GET_CUE_COLOUR_OVERRIDES(),
      ]);
    }
    return Promise.resolve();
  }),
]);

Test plan

  • ESLint passes with no errors
  • All 83 Vitest tests pass
  • Manual testing of affected pages to verify data loads correctly:
    • Script Editor
    • Cue Editor
    • Microphone Configuration
    • System Configuration
    • Character Configuration
    • Props/Scenery Configuration
    • Live Show View

🤖 Generated with Claude Code

@Tim020 Tim020 added the claude Issues created by Claude label Jan 30, 2026
@github-actions github-actions bot added client Pull requests changing front end code medium-diff labels Jan 30, 2026
@github-actions
Copy link

github-actions bot commented Jan 30, 2026

Client Test Results

83 tests  ±0   83 ✅ ±0   0s ⏱️ ±0s
 3 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit ff83090. ± Comparison against base commit 3985876.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

Python Test Results

  1 files  ±0    1 suites  ±0   46s ⏱️ -1s
447 tests ±0  447 ✅ ±0  0 💤 ±0  0 ❌ ±0 
452 runs  ±0  452 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ff83090. ± Comparison against base commit 3985876.

♻️ This comment has been updated with latest results.

…ching

Converts sequential await chains to parallel Promise.all calls in 10 Vue
components, significantly improving page load times by running independent
API calls concurrently.

High priority refactors (largest impact):
- ScriptEditor.vue: 14 sequential awaits → parallel groups
- CueEditor.vue: 13 sequential awaits → parallel groups
- ConfigMics.vue: 6 sequential awaits → single Promise.all

Medium priority refactors:
- ConfigSystem.vue: 4 parallel fetches
- ConfigCharacters.vue: 2 parallel fetches
- CharacterGroups.vue: 2 parallel fetches
- PropsList.vue: 2 parallel fetches
- SceneryList.vue: 2 parallel fetches

Additional optimizations:
- App.vue: Parallelize RBAC roles with WebSocket state check; parallelize
  user RBAC and settings after user fetch
- ShowLiveView.vue: Parallelize session data and act list fetches

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Tim020 Tim020 force-pushed the feature/promise-all-parallel-fetches branch from 90d44f1 to ff83090 Compare January 30, 2026 01:41
@sonarqubecloud
Copy link

@Tim020 Tim020 merged commit cb61840 into dev Jan 30, 2026
25 checks passed
@Tim020 Tim020 deleted the feature/promise-all-parallel-fetches branch January 30, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude Issues created by Claude client Pull requests changing front end code medium-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants