Skip to content

feat: add page-controller and corresponding UI support#305

Open
WTHDonghai wants to merge 1 commit intoalibaba:mainfrom
WTHDonghai:submit-upstream
Open

feat: add page-controller and corresponding UI support#305
WTHDonghai wants to merge 1 commit intoalibaba:mainfrom
WTHDonghai:submit-upstream

Conversation

@WTHDonghai
Copy link
Copy Markdown

What

Added support for page-controller logic and implemented the corresponding SimulatorMask UI within the panel.

Type

  • Bug fix
  • Feature / Improvement
  • Refactor
  • Documentation
  • Website
  • Demo / Testing
  • Breaking change

Testing

  • Tested in modern browsers
  • No console errors
  • Types/doc added

Closes #(issue)

Requirements / 要求

  • I have read and follow the Code of Conduct and Contributing Guide . / 我已阅读并遵守行为准则。
  • This PR is NOT generated by a bot or AI agent acting autonomously. I have authored or meaningfully reviewed every change. / 此 PR 不是由 bot 或 AI 自主生成的,我已亲自编写或充分审查了每一处变更。

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


daniel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gaomeng1900
Copy link
Copy Markdown
Collaborator

Thanks for your contribution!

Could you provide more context about this PR? Specifically, what problem does it solve? It would be great if you could open an issue first so we can discuss the approach before proceeding with the implementation.

@WTHDonghai
Copy link
Copy Markdown
Author

Hi @gaomeng1900,

Thank you for the quick response! I sincerely apologize for submitting the PR directly without opening an Issue first — I should have followed the process and discussed the approach with you all.

Context & Problem Solved: Recently, I was studying the source code of page-controller and ui packages. During my learning, I noticed a very common pain point: typically, we only want the LLM to focus on the main content area (such as a specific list/table) and ignore irrelevant sections like the top navigation menu, page header, or footer.

To solve this, I casually built this experimental feature to "frame the viewport" and control the extracted DOM area through the UI. It helps prevent the LLM from being distracted by the global layout noise and saves a lot of context tokens.

I totally understand if you prefer to formalize this before reviewing the code. Would you like me to open a new Issue so we can discuss if the project currently needs this "zoning/focus" capability?

Alternatively, if this feature is not on the roadmap right now, please feel completely free to close this PR. I'm just happy to share it and perfectly fine with treating it as my own learning exercise.

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.

3 participants