CritasWang opened a new pull request, #35:
URL: https://github.com/apache/tsfile-viewer/pull/35

   ## Summary
   
   Three fixes in this PR:
   
   ### 1. Migrate filter selects to virtualized `el-select-v2` (performance fix 
for #33 follow-up)
   
   **Problem**: `TableFilterPanel` and `TreeFilterPanel` used `el-select` with 
`v-for`-rendered `<el-option>` elements. When a TsFile has hundreds or 
thousands of devices/measurements, every option becomes a real DOM node, 
causing severe layout jank — especially when coupled with `v-loading`'s overlay 
DOM flip between loading/content states.
   
   **Fix**: 
   - Replaced all `el-select` + `<el-option>` with `ElSelectV2` (Element Plus's 
virtualized select component), which only renders ~10 visible DOM nodes 
regardless of option count
   - Replaced `v-loading` (which creates/destroys a full-cover overlay div, 
triggering reflows) with a thin CSS-only animated progress bar at the top of 
each filter panel
   
   ### 2. Fix filename display turning into garbage/junk after page refresh
   
   **Problem**: Uploaded files get a UUID-format `fileId` (e.g. 
`a1b2c3d4e5f6`). After a browser refresh, `currentFileName` is lost from 
memory, and `displayFileName` falls back to `decodeFileId(fileId)` — which 
tries to base64-decode a UUID hex string, producing garbled characters.
   
   **Fix**:
   - Persist `currentFileName` to localStorage via `restoreCurrentFile()`, 
called at setup time (before watchers fire)
   - Add UUID-format detection (`/^[0-9a-fA-F]{8,32}$/`) to skip base64 decode 
for upload IDs
   - Support both Unix (`/`) and Windows (`\`) path separators in basename 
extraction
   
   ### 3. Clean up leftover `onMounted` in chart view
   
   Removed a dangling `onMounted(() => fileStore.restoreCurrentFile())` from 
the chart view (the call now happens in `setup()`).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to