feat(workflow): attention nudge when a launch workflow parks on a gate
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, python
调研方向
Start with the workflow runner and external event buffer in src/profiles/server/routes/workflow.py and src/profiles/server/routes/instance.py, then trace how the App polls /api/notifications and displays port handoff toasts. Add a gate event when a session newly enters a waiting state, and handle it in the web layer with deduplication and focus checks. Done means the gate draws attention through the requested cues without repeating for the same session and step; the issue names no test files.
由索引模型根据 Issue 内容生成。
描述
Problem
When a launch triggers workflow hooks containing ask:/notify: gates, the session parks in waiting_ask/waiting_notify until the user answers. Users who trigger launches via barcode scans or keyboard shortcuts are frequently focused in another application when the gate appears — ProFiles sits in the background with the runner modal open and nothing draws them back. Interactive sessions are kept indefinitely (the TTL purge only drops terminal sessions), so a missed gate can block the rest of a workflow for as long as the app runs.
Evidence
- The only way forward is the
respondroute;src/profiles/server/routes/workflow.py:397-643. The purge atsrc/profiles/server/routes/workflow.py:90-96explicitly keeps interactive sessions (Drop terminal sessions past the TTL (interactive ones are kept)). - A general UI event poll channel already exists and is already polled by the app for port-handoff toasts:
GET /api/notificationsatsrc/profiles/server/routes/instance.py:74(state.external_events_after(after)). - No event is recorded when a session enters a waiting state, and no OS-level attention mechanism (toast,
document.titleflash, notification) exists anywhere in the web layer today.
Proposed approach
- Server: when the session runner parks on
waiting_ask/waiting_notify/ notice, push an event into the existing external-events buffer (same channel the port handoff uses), carrying session id + gate kind. - Web: the App-level notifications poll already runs — on a gate event, show a toast, flash
document.title, and fire a Web Notification where the environment permits. Fire only when the gate is newly reached (dedupe per session+step), and skip when the document has focus. - Desktop (optional stretch): a pywebview-specific attention request kept inside
profiles.desktop, per the AGENTS.md layering rules (presentation layer only). - Scope S-M. No breaking change — additive event + UI behaviour.
Alternatives considered
- Auto-timeout on gates — changes workflow semantics and could auto-launch or auto-skip against the user's intent; rejected.
- Sound-only cue — poor accessibility and lost on muted systems; toast + title flash is quieter, testable headlessly (vitest), and composes with the existing toast component.
Proposed during automated enhancement scan 2026-11-04
- 主要语言
- Python
- 星标
- 1
- 派生
- 1
- 平均合并
- 4 小时 46 分钟
- 30 天内合并 PR
- 55
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
falbany/ProFiles 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
falbany/ProFiles#187 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
相似的 Issue
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 86/100
aws-samples/sample-spec-driven-presentation-maker#648 ·
维护者通常 1 天内回复
-
firestore: enable live window.yaml pipeline system tests once add_window_fields is in production未关闭
难度 1/5 1 小时以内 新手友好度 64/100
googleapis/google-cloud-python#19115 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复