報告者サマリ: 報告者 のリンク先が間違っている問題を修正#18
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
報告者サマリ画面の「報告者」列リンクが誤ったリンク先(X ID ベース)になっていた問題を、Harvest の reporter_id(owner ID)を使うように修正するPRです。フロント側の型定義・集計処理・表示コンポーネント、および集計Lambdaの出力を揃えて reporterId を新しく受け渡します。
Changes:
Report/ReporterRowにreporterIdを追加し、集計・表示に渡す- 報告者サマリの「報告者」リンクを
/owners/{reporterId}/reportsに変更(X ID は x.com へのリンクのまま) - 集計Lambdaで
reporter_idをreporterIdとして出力するよう拡張
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| viewer/src/types.ts | Report に reporterId を追加し、フロントのデータ型を拡張 |
| viewer/src/reportTableUtils.test.ts | Report 生成fixtureに reporterId を追加 |
| viewer/src/reporterSummaryUtils.ts | 集計行 ReporterRow に reporterId を追加し、集計結果に載せる |
| viewer/src/reporterSummaryUtils.test.ts | reporterId を含むfixtureに更新 |
| viewer/src/components/ReporterSummary.tsx | 報告者リンク先を owner ID(reporterId)ベースに修正し、リンク生成を共通化 |
| viewer/src/aggregate.test.ts | Report fixtureに reporterId を追加 |
| lambda/aggregator/handler.py | Harvest入力の reporter_id を中間JSONの reporterId として出力 |
Comments suppressed due to low confidence (1)
viewer/src/reporterSummaryUtils.ts:55
aggregateReportersonly setsreporterIdwhen creating a new row. If the first report for a given reporter name has an emptyreporterId(or is missing it) and a later report has a non-emptyreporterId, the aggregated row will keep"", so the reporter link will stay non-clickable even though an ID exists. Consider updatingentry.reporterId(and potentiallyentry.xId) when an existing entry is found and the stored value is empty but the current report provides one.
const name = getReporterName(r);
const entry = map.get(name) ?? {
reporter: name,
reporterId: r.reporterId || "",
xId: r.reporter || "",
reportCount: 0,
totalRuns: 0,
details: [],
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
18
to
24
| quest: { questId, name: questName, level: "90", ap: 40 }, | ||
| lastUpdated: "2026-01-01T00:00:00Z", | ||
| reports: reports.map((r) => ({ | ||
| ...r, | ||
| reporterId: r.reporterId ?? "", | ||
| timestamp: "2026-01-01T00:00:00Z", | ||
| note: "", |
最初の報告に reporterId が空でも、後の報告に有効な値があれば更新する。 xId も同様に補完する。 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- reporterId が ReporterRow に正しく伝わることを検証 - 最初の報告が空 reporterId でも後続報告の値で補完されることを検証 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.