Open
Bug 2095715
Opened 6 days ago
Updated 4 days ago
[firefox-mcp] Refactor current context handling
Categories
(Developer Infrastructure :: Firefox MCP, enhancement)
Developer Infrastructure
Firefox MCP
Tracking
(Not tracked)
NEW
People
(Reporter: hbenl, Assigned: hbenl)
References
(Blocks 2 open bugs)
Details
As a follow-up to Bug 2080977 I want to refactor how we handle the current context:
- remove
ensureCurrentContext(): it silently switches to some tab when the current context is gone (Bug 2081624). Tool calls should error instead explaining that the selected context is gone and include a list of the currently open tabs - if
close_pagecloses the current tab, it should either report which tab it has made current instead or show the list of currently open tabs to choose from (or both) PageManagementshould only refreshcachedTabswhen the list is sent to the client (either bylist_pagesor in the messages described above)- remove
cachedSelectedIdxand compute it fromcurrentContextIdandcachedTabswhen needed
Comment 1•4 days ago
•
|
||
This overlaps with Bug 2081597 - [firefox-devtools-mcp] Report pages opened or closed during a tool call and should probably block the meta Bug 2081596 ?
Comment 2•4 days ago
|
||
if close_page closes the current tab, it should either report which tab it has made current instead or show the list of currently open tabs to choose from (or both)
I think we should do both, but I would prefer agreeing on a consistent way to report changes (as described in Bug 2081596 and blockers) rather than adding custom reporting to individual tools.
| Assignee | ||
Updated•4 days ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•