Skip to content

fix(research): make total input and cache subsets readable - #7391

Merged
huangruiteng merged 1 commit into
mainfrom
codex/research-input-denominator-reading-20261026
Oct 26, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/research-input-denominator-reading-20261026

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Research → Sources and usage led with uncached input while cache-inclusive totals were hidden in provenance. A synthetic session with 1,500 input tokens therefore showed 200 as its main input reading, while its separately reconciled all-request denominator was 1,800.

The usage group now leads with session input, keeps cached and uncached subsets together, and shows all-request input beside the request coverage. The two accounting bases remain separate. Packet attribution, unknowns, historical captures, unfinished Turns, reconciliation failures and complete-cost limits retain their existing semantics; optional explanation stays in shared help. No producer, model call, calculation method or source data changes.

Validation: full Chat TypeScript/build; packaged whole research-history journey on isolated HTTP/SQLite; targeted Chinese/English desktop and 390px usage states; four existing input-capture owner tests. The whole journey covers long/mixed research content, source selection, complete original/citation reading, failure/retry and keyboard return. Public captures use synthetic projections; real packet attribution and installed App adoption remain unqualified.

Premerge: four direct and eight selected automatic checks passed. Eight image holds require visual inspection; each image's pixels and PNG metadata were inspected, which does not turn those holds into an automatic privacy pass. The expanded usage disclosure is 56px taller to retain the necessary numerical breakdown; the default research view stays collapsed.

Visual evidence

Before: 1927ba22cbabc23f8fb54eb46eefa4631eab7cb1. Captures: the author UI on that baseline. The identical UI source was requalified at 5e339eebbfb54d5906ca6de41cb395d648588d50 on newer target main; four expanded captures are byte-identical after rebasing. Packaged synthetic UI and disposable real HTTP/SQLite history, with explicitly scripted saved-usage projections. No persistent preview is retained.

Default desktop Default 390px
Default research viewport Default narrow research viewport
Expanded desktop before Expanded desktop after
Previous input reading Input totals and cache subsets
Expanded 390px before Expanded 390px after
Previous narrow input reading Narrow input totals
English 390px Narrow request counters and analysis cost
English input totals Separate all-request input and analysis attempt

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机

研究页中查看模型输入开销的用户。 同一合成会话原来突出 200 个未缓存输入,改后突出 1,500 个总输入并保留 1,300 缓存与 200 未缓存;全部请求的 1,800 另列。 未缓存输入只是总输入的一个子集;只把子集放在主位,阅读结构输入占比时容易找错分母。展开来源与用量即可读到两种总输入及缓存拆分,未知归因仍显示未知。 不新增模型调用、计量方法或状态,不把缓存输入当作免费,也不补造缺失归因。 本次没有补采历史 packet 归因,也未核验安装后 App 和真实任务收益。

改动思路

计数继续由现有用量 owner 提供,前端只改变主次和分组;无需第二套计量状态或分析入口。 原有研究入口继续读取同一份已保存分析包,用量 owner 负责计数、请求核对和归因,前端负责分组和格式化。没有添加另一套成本计算,也没有把“能看到计数”当成“可以发起分析”。本次只交付研究页已有输入读数的分组与缓存拆分,不修改输入捕获、分析生成、原始来源或权限。

下面是该 head 的源码与实际合成读回对应的变化,属于呈现差异,不是费用或效率收益证明:

口径 原主读数 现在
会话输入 未缓存200 总输入1500,缓存1300、未缓存200
全部请求输入 未缓存500 总输入1800,缓存1300、未缓存500

具体改动

依据 5e339eeb 的设计规范 核对三个条目:group-readings 已实现,同组数字和单位先比较;truthful-denominator 已实现,会话与全部请求保持独立口径,未知、历史、末轮和核对失败没有被改成零;whole-page-reading 已实现本次打包读数展示的桌面/窄屏与原文往返检查。真实归因和安装后采用属于保留缺口。

关键代码讲解

本次共两处生产文件、一个现有集成断言和八张合成截图;14增/5删,没有新增模块、配置、状态或兼容分支。所有PNG逐张检查了像素和元数据;二进制检查仍与自动文本扫描分开。

对主干的风险

最重要的反例是会话计数不含压缩请求而全部请求包含压缩:若把两者误当同一个总量,字段都合法也会误导。本次合成路径明确保留1500与1800这两个不同读数;不可用请求覆盖不显示伪造请求总量。未知、历史、末轮未完成和分析用量真零/未采集也逐项读回。新增说明只在共享帮助中,完整成本仍未知;原生模型分词器与真实 packet 分子没有得到新的资格。

同一浏览器QA路径在不可变基线因总输入不可直接读取而失败,在此head通过;初次完整打包研究历程181137ms、适配最新主干后的准确head182309ms均通过。完整 Chat 类型/构建、4项输入捕获owner测试以及4个直接/8个选中premerge自动检查通过。8张图片留置逐张人工核验,不能冒称自动隐私通过或merge ready。按当前合同未查询或等待GitHub CI。

我的整体评价

结论 APPROVE,为完整但有边界的呈现增量;长程工作维度判为 preserved,未新增执行、重复效应或成本账本。用户体验维度判为 improved,仅指这些读数更容易找到和比较。实看默认整页和展开用量的桌面/390px 后,总输入、缓存和未缓存可在同组比较,请求分母与会话口径仍分开;方法留在既有帮助。展开区增加56px,是保留必要数字的代价,原文、未知和失败入口仍可达。 未验证正式 App 采用、真实任务中的阅读理解、真实 packet 分子与模型分词器校准,也不据此声称净效率收益。

默认与展开的整页、手机下方请求读数及英文窄屏均已实际看图;折叠正常、无溢出和字段正确分别作为功能检查,未代替视觉判断。架构判断保留现有owner:计数继续由现有用量 owner 提供,前端只改变主次和分组;无需第二套计量状态或分析入口。 本次只交付研究页已有输入读数的分组与缓存拆分,不修改输入捕获、分析生成、原始来源或权限。 本次不创建共享语义词汇,也不合入或安装。

English verdict: APPROVE at 5e339eebbfb54d5906ca6de41cb395d648588d50. The existing reader now exposes inclusive session/all-request input with separate cache subsets; unknown attribution and accounting boundaries remain intact. Paired baseline/head, packaged whole-history, local checks and visual inspection support this bounded UI change. Author-owned COMMENTED conclusion; merge and installed adoption are separate.

@huangruiteng
huangruiteng merged commit 2953354 into main Oct 26, 2026
25 of 31 checks passed
@huangruiteng
huangruiteng deleted the codex/research-input-denominator-reading-20261026 branch October 26, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants