Ontiomacer commented on issue #1377:
URL: 
https://github.com/apache/daffodil-vscode/issues/1377#issuecomment-3632278504

   First of all thanks @stricklandrbls — I’ve started exploring the Data Editor 
internals and I want to confirm my understanding before I begin implementing 
the feature.
   
   Here’s what I found so far:
   
   - Profiling requests (`MessageCommand.profile`) are handled in 
`dataEditorClient.ts` and are sent to omega-edit through `profileSession()`.
   - Omega-edit only reflects *applied* changes. This means any edits that are 
still pending in the Svelte editor buffer (the “unapplied changes”) are not 
included.
   - The front-end stores maintain the pending text buffer until `applyChanges` 
is triggered, but profiling always operates on the omega-edit session, not the 
unsaved buffer.
   
   Based on this, profiling ignores any text the user has typed but not yet 
applied, which matches Issue #1377.
   
   ### Proposed approach (please confirm)
   Before implementing anything, I want to verify the right direction:
   
   1. Extend the profiling request to include the pending editor buffer (the 
unapplied edits).
   2. Update the backend handler to:
      - Prefer profiling the pending buffer if it exists, or
      - Fall back to the omega-edit session if there are no pending edits.
   3. If needed, create a temporary / staged omega-edit session for profiling 
the transient buffer so the main session isn’t mutated.
   
   Does this approach align with what you expect for this feature?
   
   Once confirmed, I will proceed with the implementation.
   


-- 
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