Web UI: ContextMenu args dialog carries the previous file's arguments into the next launch

未关闭 适合新手
#133 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
react, typescript
领域
frontend

调研方向

阅读 src/profiles/web/src/components/ContextMenu.tsx,尤其是引用行附近的模态框打开路径、菜单关闭路径和 Enter 处理程序。先为一个文件输入参数并取消,然后为另一个文件打开对话框,以此重现问题。在指定路径清除参数,并确认第二次启动不会重复使用第一个文件的输入。

由索引模型根据 Issue 内容生成。

描述

bug frontend

Problem

argsValue is a single state that is never reset (src/profiles/web/src/components/ContextMenu.tsx:64-65):

const [showArgsModal, setShowArgsModal] = useState(false);
const [argsValue, setArgsValue] = useState("");

The open path (ContextMenu.tsx:195, onClick={() => { setShowArgsModal(true); }}) and the menu close path never clear it. Type --verbose for file A, cancel, then "Launch with arguments…" on file B: the input still shows --verbose, and Enter (ContextMenu.tsx:444) launches B with A's arguments.

Suggested fix

setArgsValue("") in the item's onClick before setShowArgsModal(true), and in the menu's close path.

主要语言
Python
星标
1
派生
1
平均合并
4 小时 46 分钟
30 天内合并 PR
55

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

falbany/ProFiles 的其他 Issue

查看 falbany/ProFiles 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。