No Branch/Tag Specified
main
fix/348-reveal-swipe
feat/340-syb-excluded-products
fix/351-inner-code-apply-selection
fix/350-match-layout
fix/350-inner-code-matching
feat/349-batch-return-use
feat/347-batch-return-cancel
feat/345-yeeke-reship
fix/346-root-serves-spa
fix/344-inner-code-stall-match
fix/343-syb-writeback-session
feat/339-syb-page-size
feat/338-return-match
feat/337-yeeke-admin-ui
feat/336-yeeke-return-sync
fix/335-bottom-submit-node
fix/334-spec-probe-top-swipe
fix/333-purchaser-device-owner
fix/331-spec-panel-recognition
fix/330-syb-writeback-session
feat/327-syb-writeback-filter
feat/326-order-information
fix/325-order-result
feat/316-chrome-order-backfill
fix/307-backfill-entry
feat/305-syb-order-writeback
feat/306-order-paid-amount
release/283
fix/283-purchase-mapping-consistency
fix/230-horizontal-spec-selection
feat/263-spec-rematch
fix/262-purchase-handoff
fix/260-261-purchase-readiness
fix/259-partial-collection-link
feat/258-one-click-replace
fix/257-color-normalized-match
fix/256-collection-single-dimension
fix/255-current-page-reidentify
feat/253-one-click-link
fix/254-match-loading
fix/251-syb-spec-candidates
feat/250-continuous-collection
fix/249-local-purchase-diagnostics
fix/248-bottom-submit
fix/247-short-address-panel
fix/246-address-return-panel
fix/245-purchase-failure-diagnostics
fix/244-selected-card-duplicates
fix/243-spec-entry-recovery
feat/242-agent-order-backfill
feat/241-order-backfill-endpoint
fix/239-syb-partial-sync
fix/238-spec-panel-preswipe
feat/237-client-api-keys
feat/236-purchaser-syb-sync
fix/235-syb-pagination-overlap
release/234-integrated
fix/229-address-entry-dedup
fix/228-selection-proof-panel-transition
fix/227-address-panel-return
fix/226-reopen-pdd-on-manual-retry
fix/225-in-place-purchase-retry
fix/224-final-spec-revalidation
fix/223-probed-confirmed-mapping
chore/221-devharness-sync
feat/218-purchase-result-bubble
fix/217-agent-retry-current-spec
fix/216-syb-spec-role-order
feat/215-mandatory-live-spec-probe
feat/214-verified-purchase-actions
fix/212-syb-sync-shop-snapshot
feat/211-spec-entry-ready-wait
feat/210-order-result-payment-transition
feat/209-pdd-bottom-spec-entry
feat/200-ai-match-result-purchase-ready
feat/199-job-execution-logs
feat/198-syb-ai-parse
feat/195-scheduled-spec-auto-match
fix/197-ai-write-timeout
feat/190-syb-inline-correction
fix/193-address-entry-reveal
feat/194-one-click-spec-match
fix/192-order-result-scroll
No results found.
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: OPC/goauto#185
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
原始需求摘要
来源:用户于 2026-09-01 提出,Agent 端采集任务详情和采购任务详情都不能查看图片,问是否合理加上。经讨论后用户明确要求:先做采集任务详情(数据现成、价值直接),采购任务详情作为后续可选项,本单不做。
目的:让现场作业能在 Agent 手机上直接核对采集到的颜色截图是否正确、清晰、对应正确颜色,不用切到 admin 才能看。
基线与已核实事实
代码基线:
5338dd0(2026-09-01)。核验日期 2026-09-01。pdd_product_color_image表(SourceTaskID记录来源采集任务,SourceDeviceID记录来源设备),由task.UploadColorImage(task/color_image_service.go:40)在采集提交后写入,公开路径前缀/static/uploadfile/goauto-color/(color_image_service.go:30),经sys_router.go:54的r.Static("/static", "./static")无鉴权对外提供,Agent 已配置的服务端地址可直接拼接访问,无需新增网络权限或域名白名单。AndroidManifest.xml:19已声明usesCleartextTraffic="true",明文/加密访问均不受阻。ux_pdd_product_color_image唯一索引 onpdd_product_id, color),新采集会覆盖旧图(color_image_service.go的clause.OnConflictupsert,旧文件由removeReplacedColorImage删除)。因此若同一 PDD 商品的同一颜色被后续任务重新采集,source_task_id会指向最新那次任务,较早任务的详情将不再显示该颜色的图——这是准确行为(图确实已被覆盖),需要在文案里说明,不是缺陷。task.AgentHistoryDetail(task/agent_history.go:138-184)当前只查询并返回colorPrices、skus、dimensions、missing等字段,完全没有查询或返回颜色图片;admin 端等价接口product.Detail(product/service.go:227-237)已有现成的查询与响应模式(ColorImageView{Color, ImagePath, Width, Height, UpdatedAt})可直接参考复用查询写法。CollectionHistoryDetail(AgentApiClient.kt:115-125)与其 JSON 解析(:442-465)均无图片字段,需要同步扩展。TaskHistoryFragment及其余 UI 代码里没有ImageView,build.gradle未引入 Glide/Coil 等图片加载库,采集/采购详情页目前全部由纯文字标签拼成。本单是 Agent 第一次需要展示图片,需新增基础设施(图片加载库或使用系统原生方案)而不只是加字段。COLOR_IMAGE_LOCATE_FAILED/CROP_FAILED/UNSUPPORTED/UPLOAD_FAILED等,定义于persistence/AgentDiagnosticStore.kt:47-52)目前只写入设备本地 SQLite(agent_diagnostic表),服务端和 Agent 的历史详情接口均未读取;本单不涉及把诊断原因接入详情页,只做"展示已成功采集到的图片"。目标
AgentHistoryDetail响应扩展颜色图片字段,只返回归属于本任务(source_task_id = 本任务ID)的记录,不返回该 PDD 商品下由其他任务采集的图片。非目标
/static无鉴权公开路径;如需收紧鉴权是更大范围的改动,不在本单处理。agent_diagnostic)到详情页,只展示已成功采集到的图片本身。前置依赖与并行性
BitmapFactory/ImageView手动加载),属于本单实施前需要确定的技术选型,不预先假定。固定实施方案(含 2026-09-01 界面细节确认)
1. 服务端
task/agent_history.go的AgentHistoryDetail:新增查询pdd_product_color_imagewheresource_task_id = taskID,按color ASC排序。AgentCollectionDetail新增字段ColorImages []AgentColorImage,AgentColorImage{Color, ImagePath, Width, Height}(复用 admin 端ColorImageView的字段命名习惯,保持跨端一致)。2. Android 网络层
AgentApiClient.kt的CollectionHistoryDetail新增colorImages: List<HistoryColorImage>字段及对应 JSON 解析,模式与现有colorPrices解析一致。serverUrl()拼接得到完整地址,不新增单独的图片域名配置。3. Android UI
TaskHistoryFragment.renderCollectionDetail在现有info文本控件(以"SKU:N 条"结尾)之后,同一张卡片内新增颜色图片区域:按颜色分组展示缩略图,加载失败显示占位而非崩溃或空白,无图片时显示"暂无颜色图片"一类空状态文案。位置已确认,紧跟 SKU 行,不跳到卡片外。设计证据
新增展示区域涉及采集详情页的布局调整,且是 Agent 首次引入图片渲染,按规则需要标注截图或低保真图交用户确认,覆盖:有图片(单色/多色)、无图片、加载失败、点击放大四个状态。图片位置(紧跟 SKU 行)与是否支持点击放大已于 2026-09-01 确认,标注截图只需体现具体视觉呈现,无需重新讨论这两点。
验收标准
必测场景
风险与安全门禁
文档影响
有长期文档影响。 Agent 采集任务详情接口新增响应字段,需更新
docs/08-agent-api-contract.md中对应接口说明。在线回读 revision 后完成一次sync和一次sync --check,revision 回写本工单。状态
待确认(2026-09-01 创建;图片位置(紧跟 SKU 行)与点击放大需求已于同日确认;等待用户确认界面标注截图(具体视觉呈现)后方可实施)。
界面低保真草案 v1(2026-09-01,待用户确认;尚未编写生产代码)。当前会话未暴露 Gitea MCP,按仓库规则回退 Gitea API。
设计依据:沿用 Agent 当前详情卡片、Roboto/系统主题与 4/8dp 间距;缩略图触控区 88 x 88dp(高于 48dp 无障碍下限),图片加载时预留固定尺寸避免跳动;每张图提供“颜色 + 查看大图”的无障碍描述。
覆盖状态:单色/多色、有图、无图、加载中、加载失败、点击放大。实现选型拟采用 Android 原生 ImageView + 后台 HttpURLConnection/BitmapFactory、内存缩放与主线程回填,不新增第三方图库依赖;详情退出时取消或忽略过期回调。
用户已于 2026-09-01 确认低保真草案 v1(评论 #6703),覆盖位置、三列缩略图、有图/无图/加载失败和大图对话框状态。现进入生产代码实施。
v1 实施完成,等待验收
实现
colorImages,只返回source_task_id仍指向当前任务的颜色图片;旧任务图片被后续采集覆盖后返回空数组。HttpURLConnection、BitmapFactory、下采样与 LRU 缓存;仅允许服务端/static/uploadfile/goauto-color/路径,限制 5MB、超时且不跟随重定向,不引入第三方图片库。验证与证据
go test ./...与服务端构建通过。3aab1f0 feat(goauto): 完善替代采集与颜色图片详情 (#184 #185)。36d7285beb3f0c8441e38b4e9e81e5cf7256b603;Android-Agent-API-Contract revision0f448673dbec00a351c397d30926f0c5090a1141。8612553a28524d72e095e8e855a5b6a9789db59f0ff9c521e8a37b551c64cb71。发布与未验证项
线上发布完成
3aab1f0。/home/goauto/releases/20260901-102000-3aab1f0;回滚目录:/home/goauto/releases/20260901-090504-c07c345,旧发布未删除。running、order_submit_started、order_result_unknown的采购任务均为 0。goauto.service为active;内部及外部/api/v1/health均为 HTTP 200,外部 Admin 首页为 HTTP 200;最近发布窗口无 service error 日志。40569d90bc6bcbd3b3edb14aca41f336a09c07f9a6b2dcadc1b06eca1184ca88。8612553a28524d72e095e8e855a5b6a9789db59f0ff9c521e8a37b551c64cb71,与本地构建一致。/api/agent/v1/app/latest无 Token 返回预期DEVICE_TOKEN_INVALID,证明外部路由进入业务鉴权层。agent_app_release/agent_app_release_setting现有服务契约完成登记与当前版本切换,并回读数据库及文件验证。/tmp上传包与解压暂存目录;正式发布目录、历史发布和 APK 版本均保留。线上 Agent APK 下载权限修复
用户在 Agent 0.9.35 点击“下载新版本”时收到“服务端处理失败”。根因确认:
goauto.service以goauto:goauto运行,但当前发布目录的var/goauto-agent-releases及 APK 属主为root:root;目录750、文件640导致服务进程无法stat/openAPK,版本检查可成功而下载接口返回INTERNAL_ERROR。已修复当前发布
/home/goauto/releases/20260901-102000-3aab1f0:current解析目标及目录内无符号链接;goauto:goauto;750、文件640,未放宽公开读取;goauto用户成功完整读取 versionCode 50 APK,SHA-256 为8612553a28524d72e095e8e855a5b6a9789db59f0ff9c521e8a37b551c64cb71;goauto.service为active,内部和外部健康接口均为 HTTP 200。未安装手机、未触发采购/订单/付款。等待用户在手机重新点击下载验证真实设备链路。