eigent icon indicating copy to clipboard operation
eigent copied to clipboard

[Feature Request] Global Layout Shift & Style Contamination when switching file types (CSV vs MD) in agent folder

Open Pakchoioioi opened this issue 9 months ago • 2 comments

Motivation

https://github.com/user-attachments/assets/4a7d853e-439b-43ab-ac31-d5168e9772d1

When switching between two different file types (specifically in_progress_tickets.csv and shared_files.md), the typography and layout of the entire interface (including the sidebar file list and outer containers) shift visibly.

It appears that the CSS for the internal file renderers is not properly scoped. The files rendering logic within agent folder should not affect the layout of the surrounding app workspace.

Solution

No response

Alternatives

No response

Additional context

No response

Pakchoioioi avatar Feb 13 '26 11:02 Pakchoioioi

Hi, @Pakchoioioi You’re absolutely right: the visible typography and layout shifts when switching between in_progress_tickets.csv and shared_files.md indicate that renderer-specific styles are leaking into the global scope.

Root Cause

The internal file renderers (within the agent folder) are currently injecting CSS that is not fully scoped. As a result: Global typography (font size, line height, etc.) is being overridden Layout styles are affecting shared containers (sidebar, outer layout wrappers) Renderer-specific resets or base styles are cascading beyond their intended boundary This confirms that the file content styles are not properly isolated from the application shell.

I'll refactor the file rendering logic to ensure proper style isolation by:

  • Scoping all renderer styles under a dedicated container (e.g., .agent-file-renderer)
  • Removing any global selectors from renderer styles
  • Ensuring no base typography resets are applied outside the renderer root
  • Auditing for unintended inheritance affecting layout wrappers

If needed, I can also consider stronger isolation techniques (e.g., CSS Modules, Shadow DOM, or stricter style encapsulation patterns) to prevent future regressions. @Pakchoioioi , @Wendong-Fan Could you please assign it to me?

dataCenter430 avatar Feb 13 '26 12:02 dataCenter430

thanks @dataCenter430 , assigned this issue to you, please make sure check our https://github.com/eigent-ai/eigent/blob/main/CONTRIBUTING.md#eigent-contribution-guideline and attach a fixed video under the PR

Wendong-Fan avatar Feb 15 '26 09:02 Wendong-Fan