fix(chat): thread path:line refs through file open - #1149
ZxlDragonDoctor wants to merge 2 commits into
Conversation
parseFileRef still strips :line[:col] for labels, but resolvePreviewTarget keeps the position on the target. FileRefChip and useOpenChatFileRef pass it to the host file request so FilesTab can scroll to the line. Plugin-view locations stay plain paths.
|
The threading itself (parse → chip → hook → work-panel request →
The four, all assertion-staleness rather than logic bugs:
(3) and (4) are the same onOpen-signature staleness as (2). Also spotted while scanning:
|
|
I reviewed the current head against the reported behavior. The issue is real, but this PR is not a complete root-cause fix yet.
The PR explicitly treats plugin locations as a non-goal, which leaves the reported failure mode intact. I am leaving this PR open and not merging it until the position is threaded through the plugin-view path (or the landing scope is changed with an explicit compatibility decision). |
Review follow-up on vastsa#1149: - fileManagerPluginTab accepts optional { line, column } and stores them on WorkPanelTab (same fields the host file tab already uses). - useOpenChatFileRef passes the chat position into that plugin tab instead of dropping line/column whenever the bundled file view is available. - Stale assertions updated to the new onOpen(..., { line, column }) contract and to resolvePreviewTarget carrying line on path:line tokens.
|
Pushed follow-up for the review notes on this PR: Stale assertions (the 4 failures)
Root-cause gap (plugin path)
Host fallback Please re-run: Happy to follow the plugin view's remaining scroll wiring if the file-manager bundle needs a separate change outside this repo. |
|
Re-ran your requested command on head
After those two regex updates the pair of suites should go fully green — everything else (typecheck, the two root-cause fixes, the assertion updates you already pushed) checked out clean on my side. |
|
Heads-up before this lands: follow-up Reproduction (same command you requested, three consecutive runs on a clean checkout of On pristine Suggested directions (either works):
Tested on: clean checkout of |
|
Thanks for the follow-up and for carrying the line/column through the host file-tab path. I checked the current head against I also merged the PR head with current Because the bundled-view path still does not consume the position, this does not yet remove the reported failure mode, so I am not merging it. Please wire the position into the file-manager view's actual navigation/scroll path and add a regression that verifies the rendered view lands on the requested line; then update those two assertions and rerun the affected suites. Thank you for the work on this. |
|
Thanks for the sustained work on threading the position through the chat and work-panel paths. The completed fix landed in successor PR #1349: positioned references now carry line and column to the host file tab, where the requested line is scrolled into view. Since the bundled file-manager API accepts only an opaque path and has no line-navigation contract, positioned references use that host viewer while ordinary file references keep the bundled view. The successor passed the current-main CI and the isolated Electron line-scroll E2E. This PR is superseded by #1349 and is being closed. Thank you. |
Review follow-up on vastsa#1149: - fileManagerPluginTab accepts optional { line, column } and stores them on WorkPanelTab (same fields the host file tab already uses). - useOpenChatFileRef passes the chat position into that plugin tab instead of dropping line/column whenever the bundled file view is available. - Stale assertions updated to the new onOpen(..., { line, column }) contract and to resolvePreviewTarget carrying line on path:line tokens.
Problem
Chat
[path:line]chips open the file but not the line (#681).parseFileRefstrips:line[:col]before any opener, soFileRefChip/useOpenChatFileRefnever see the position.Solution
parseFileRefPosition()keeps:line[:col];resolvePreviewTargetattaches it to the file targetFileRefChipanduseOpenChatFileRefpass{ line, column }into the host open pathworkPanelFileRequest/WorkPanelTabcarryline/columnthrough every tab→request constructionFilesTabscrolls to the requested line#L) so the bundled file-manager is unchangedTesting
node --test apps/desktop/test/chat-links.test.mjs apps/desktop/test/transcript-file-chips.test.mjsIssue alignment
workPanelFileRequestplus every tab→request constructionFileRefChippath#L#Ljump would need a bundled plugin update; this PR keeps plugin locations plain as accepted, and the host file tab now lands on the line.Non-goals
#Llinks (follow-up)