Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

## 2026-11

- 11-20 简报页改版:宽幅两栏,左边每个来源一块磁贴(点了滚过去)和筛选片(★★★ / ★★ / ★ / bug / 有更新,可多选),右边每个来源一张卡(实色磁贴头、条数与 ★★★ / bug / 有更新 的计数、可折叠);每条前面有勾选框,处理完勾掉(只记在这个浏览器里,重新生成后清零),可以隐藏已勾掉的;窄屏单栏。顺手修了链接文字里带方括号(日历事件「[Daily] …」)渲染不成链接的问题
- 11-20 简报页多了「这次是怎么生成的」:链路(WSL 里的 Claude Code 版本、模型、权限模式)、每个相关 MCP 服务器的状态和这次用没用到(没登录的直接给登录命令)、每次工具调用、那个账号跑的 hooks、完整命令和提示词原文;失败的那次也留。设置里新增「额外放行的工具」:连接器换了名字时自己补一行,不用等改代码
- 11-19 工作简报改在浏览器里看:岛上的小文档按钮、早上提醒的「查看」、右键「查看最近一份」都打开配置全景服务的简报页(概要、用量、全文、「重新生成」,生成中页面自己更新)。右键菜单里的「生成时间」子菜单拿掉,换成「简报设置…」翻到配置全景;笔记 / Slack 关注仍在原来的窗口里
- 11-19 配置全景的待处理里,「联动开着但没有 hooks」那一条有了「修复」按钮:确认一次就把 hooks 装回去,图上那条断线随即变回来(WSL 那条在后台装,装完自己更新)。从页面或设置进程关掉联动通道时,肥鱼自己装的 hooks 也会一起卸掉,和右键菜单关闭一样
Expand Down
11 changes: 10 additions & 1 deletion docs/config-panorama.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,15 @@ flowchart LR
`details` 是「这次是怎么生成的」那几段 `{title, html}`(服务端渲染、全部转义,见[公司侧助理](work-assistant.md)的
「运行记录」),页面折叠着摆在全文下面、第一段默认展开;里面的 `__SETTINGS_URL__` 占位由页面换成
`/#<令牌>&settings=<settings_focus>`(同一个服务、同一个令牌)。
- **分区、筛选、勾掉**(2026-11-20 改版):provider 把渲染好的全文按 `<h3>` 切成 `sections[]`(`reports.split_sections`:每区
`id / source / title / html` 和顶层条目的计数 `count / p3 / p2 / p1 / bugs / updated`;`source` 只是按标题关键词猜的来源,
配色用)。页面:顶栏 sticky(标题 · 生成时间 · 用量 · 状态 · 「重新生成」),概要大字;≥ 980px 两栏——左栏 240px 贴着滚:
每区一块实色磁贴(点了滚过去)、筛选片(`全部 / ★★★ / ★★ / ★ / 🐞 bug / 有更新`,多选取并集)、「隐藏已勾掉」、
「这次是怎么生成的」锚;右栏每区一张卡(实色磁贴头 + 计数徽章 + 折叠)。窄屏单栏,磁贴变成顶部一行横滚。
进页面后 `report.js` 给每张卡里**顶层**的每一条打 `data-p / data-bug / data-upd`(`items.classify`:开头的 ★ 类名、
`li.bug`、行里的 `<strong>`)并插一个勾选框;勾掉只存这个浏览器的 `localStorage`(键 = 报告名 + 生成时间 + 区 + 序号,
重新生成就是新的一套),不进肥鱼、不进配置。分类与筛选是纯函数(`items.js`),QJSEngine 里直接测;DOM 接线只在真浏览器核对。
没有 `<h3>` 的内容(老简报、空内容)退回整段 `article`。
- **数据怎么到页面**:每份报告自己一个 `Feed`。第一次 `GET /api/report/<名字>` 时还没发布过,请求线程经 `on_gui` 让界面线程做一份
(`publish_report(force=True)`);之后页面带编号等更新。简报服务 `started` / `finished` 时应用调 `publish_report(name)`——
**没人打开过页面就什么都不做**(provider 不白跑)。`report_watched(name)` = 有请求挂在那份报告上 = 用户正开着看,
Expand All @@ -333,7 +342,7 @@ flowchart LR
- **「重新生成」**:`POST /api/actions/generate_report {report}` → `generate_work_briefing` → `started / busy / failed / unavailable`。
回 `started` 页面不动按钮,等 `started` 信号带来的重画把它变灰、`finished` 再放开。
- **隐私**:内容不进全景图、不落快照、不进日志(服务只记请求行);只经带令牌的接口给 `127.0.0.1` 上的浏览器。
- 两张页共用 `client.js`(取令牌、`api` / `api.patch` / `api.post`);`report.js` 是会自己跑起来的入口,**不在 `MODULES` 里**
- 两张页共用 `client.js`(取令牌、`api` / `api.patch` / `api.post`);`items.js` 是报告页的纯函数;`report.js` 是会自己跑起来的入口,**不在 `MODULES` 里**
(不能拼进全景的离线快照)。

### 文件查看(只读)
Expand Down
14 changes: 14 additions & 0 deletions pet/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2461,5 +2461,19 @@
"panorama.ui.report_action_started": "Started, about a minute…",
"panorama.ui.report_action_busy": "Already generating, wait for it.",
"panorama.ui.report_action_failed": "Couldn't start it, see the fish's log.",
"panorama.ui.report_sections": "Sections",
"panorama.ui.report_filters": "Filter",
"panorama.ui.report_filter_all": "All",
"panorama.ui.report_filter_p3": "★★★",
"panorama.ui.report_filter_p2": "★★",
"panorama.ui.report_filter_p1": "★",
"panorama.ui.report_filter_bug": "🐞 bugs",
"panorama.ui.report_filter_upd": "updated",
"panorama.ui.report_hide_done": "Hide ticked-off items",
"panorama.ui.report_items": "{n} items",
"panorama.ui.report_untitled": "(untitled)",
"panorama.ui.report_fold": "Collapse / expand this section",
"panorama.ui.report_trace": "How this run went ↓",
"panorama.ui.report_done": "Tick it off when handled (kept in this browser only; cleared on regeneration)",
"panorama.ui.report_action_lost": "Can't reach the fish."
}
14 changes: 14 additions & 0 deletions pet/locale/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2453,5 +2453,19 @@
"panorama.ui.report_action_started": "已出发,大约一分钟…",
"panorama.ui.report_action_busy": "正在生成,等它完成。",
"panorama.ui.report_action_failed": "没能发起,看肥鱼的日志。",
"panorama.ui.report_sections": "分区",
"panorama.ui.report_filters": "筛选",
"panorama.ui.report_filter_all": "全部",
"panorama.ui.report_filter_p3": "★★★",
"panorama.ui.report_filter_p2": "★★",
"panorama.ui.report_filter_p1": "★",
"panorama.ui.report_filter_bug": "🐞 bug",
"panorama.ui.report_filter_upd": "有更新",
"panorama.ui.report_hide_done": "隐藏已勾掉的",
"panorama.ui.report_items": "{n} 条",
"panorama.ui.report_untitled": "(无标题)",
"panorama.ui.report_fold": "收起 / 展开这一区",
"panorama.ui.report_trace": "这次是怎么生成的 ↓",
"panorama.ui.report_done": "处理完了就勾掉(只记在这个浏览器里,重新生成后清零)",
"panorama.ui.report_action_lost": "连不上肥鱼。"
}
3 changes: 2 additions & 1 deletion pet/panorama/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
_HEADING = re.compile(r"^(#{1,6})\s+(.*?)\s*#*\s*$")
_ITEM = re.compile(r"^(\s*)(?:([-*])|(\d{1,3})[.)])\s+(.*)$")
_CODE = re.compile(r"`([^`\n]+)`")
_LINK = re.compile(r"\[([^\]\n]+)\]\((https?://[^\s)]+)\)")
# 链接文字里允许一层方括号(日历事件的标题常是「[Daily] …」):``[[Daily] 标题](https://…)``
_LINK = re.compile(r"\[((?:[^\[\]\n]|\[[^\[\]\n]*\])+)\]\((https?://[^\s)]+)\)")
_BARE_URL = re.compile(r"(?<![\w\"'=/(])https?://[^\s<>()\"']+")
_BOLD = re.compile(r"\*\*(?=\S)(.+?)(?<=\S)\*\*")
_STARS = re.compile(r"^(★{1,3})\s*")
Expand Down
46 changes: 46 additions & 0 deletions pet/panorama/page/items.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* 简报页的纯函数:给一条 <li> 分类、按筛选判断显不显示、左栏磁贴 / 筛选片 / 右栏卡片的 HTML。
不碰 DOM、不认识具体功能(只认识「几区、每区几条、每条有没有 ★ / bug / 有更新」),测试里直接调。 */
import {esc} from './util.js';

var PRIORITY = /^\s*<span class="star s([123])">/;
var FILTERS = ['p3', 'p2', 'p1', 'bug', 'upd'];

/* 一条的分类:优先级(渲染器把开头的 ★ 变成 <span class="star sN">)、bug(<li class="bug">)、有更新(行里的 <strong>) */
export function classify(html, className) {
var m = PRIORITY.exec(String(html || ''));
return {p: m ? +m[1] : 0, bug: /(^|\s)bug(\s|$)/.test(String(className || '')), upd: /<strong>/.test(String(html || ''))};
}

/* 选中的筛选片(数组,空 = 全部;多选取并集)+「隐藏已勾掉」→ 这条显不显示 */
export function passes(item, filters, hideDone) {
if (hideDone && item.done) return false;
if (!filters.length) return true;
return filters.some(function (f) { return f === 'bug' ? item.bug : f === 'upd' ? item.upd : item.p === +f.slice(1); });
}

function countText(strings, key, count) { return esc(String(strings[key] || '{n}').replace('{n}', count)); }

export function navTiles(sections, strings) {
return sections.map(function (s) {
return '<a class="tile src-' + esc(s.source) + '" href="#' + esc(s.id) + '" data-go="' + esc(s.id) + '">' +
'<span class="t">' + esc(s.title || strings.report_untitled) + '</span><span class="n">' + countText(strings, 'report_items', s.count) + '</span></a>';
}).join('');
}

export function filterChips(filters, hideDone, strings) {
var chips = [{f: '', label: strings.report_filter_all, on: !filters.length}].concat(FILTERS.map(function (f) {
return {f: f, label: strings['report_filter_' + f], on: filters.indexOf(f) >= 0};
}));
return chips.map(function (c) {
return '<button class="chip' + (c.on ? ' on' : '') + '" data-f="' + c.f + '" aria-pressed="' + c.on + '">' + esc(c.label) + '</button>';
}).join('') + '<label class="hide"><input type="checkbox" id="hide-done"' + (hideDone ? ' checked' : '') + '> ' + esc(strings.report_hide_done) + '</label>';
}

export function card(s, strings, collapsed) {
var badges = [['p3', s.p3, '★★★'], ['bug', s.bugs, '🐞'], ['upd', s.updated, strings.report_filter_upd]].filter(function (b) { return b[1] > 0; })
.map(function (b) { return '<span class="badge ' + b[0] + '">' + esc(b[2]) + ' ' + b[1] + '</span>'; }).join('');
return '<section class="card src-' + esc(s.source) + '" id="' + esc(s.id) + '"' + (collapsed ? ' data-collapsed="1"' : '') + '>' +
'<header class="head"><h3>' + esc(s.title || strings.report_untitled) + '</h3><span class="count">' + countText(strings, 'report_items', s.count) + '</span>' +
badges + '<button class="fold" data-fold="' + esc(s.id) + '" aria-expanded="' + !collapsed + '" title="' + esc(strings.report_fold) + '">' +
(collapsed ? '▸' : '▾') + '</button></header><div class="list">' + (s.html || '') + '</div></section>';
}
Loading
Loading