Skip to content

Conversation

Copy link

Copilot AI commented Jan 21, 2026

Session.vue was a monolithic 18k-line file. Extracted reusable UI sections into dedicated Vue 2 components, reducing it to ~16,900 lines (~1,083 line reduction).

New Components (src/components/pages/session/)

  • VideoOverlay.vue - Draggable/resizable video overlay with projection canvas
  • ImportDialog.vue - File type selection dialog
  • ShareDialog.vue - URL/file sharing with settings
  • SampleSelectionDialog.vue - Sample motion data picker
  • GithubInfoDialog.vue - Repository info modal
  • SceneControls.vue - Background, ground, axes, camera, lights settings
  • TimelapseControls.vue - Timelapse mode with manager dialog
  • ForcesDialog.vue - Forces visualization dialog with settings
  • MarkersDialog.vue - Markers visualization dialog with settings
  • RecordingControls.vue - Video recording section with settings dialog
  • CaptureControls.vue - Image capture section with settings dialog
  • PlotDialog.vue - Real-time plotting dialog (draggable/resizable)

Integration Pattern

Components use v-model for visibility and emit events for parent actions:

<ImportDialog
  v-model="showImportDialog"
  @select-file-type="selectFileType"
  @open-forces-dialog="openForcesDialogFromImport"
/>

Child component refs accessed via computed properties:

computed: {
  videoPreviewElement() {
    return this.$refs.videoOverlayComponent?.getVideoPreview();
  }
}
Original prompt

split the Session.vue into many files to be better organized, instead of one huge file. Follow the best practices and keep vue 2


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 5 commits January 21, 2026 22:39
Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
…imelapseControls)

Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
…ccess

Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor Session.vue into multiple organized files Split Session.vue into modular components for better organization Jan 21, 2026
Copilot AI requested a review from Seeeeeyo January 21, 2026 22:59
@Seeeeeyo
Copy link
Owner

@copilot Can we keep going to reduce even further?

Copilot AI and others added 6 commits January 21, 2026 23:59
Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
…rols, CaptureControls, PlotDialog

Co-authored-by: Seeeeeyo <43852124+Seeeeeyo@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 22, 2026

@copilot Can we keep going to reduce even further?

Extracted 5 more components (456dcdd):

  • ForcesDialog.vue - Forces visualization dialog
  • MarkersDialog.vue - Markers visualization dialog
  • RecordingControls.vue - Video recording section
  • CaptureControls.vue - Image capture section
  • PlotDialog.vue - Real-time plotting dialog

Session.vue is now down from 17,975 to 16,892 lines (~1,083 line reduction) with 13 total extracted components.

Screenshot

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.

2 participants