-
Notifications
You must be signed in to change notification settings - Fork 1
fix(ui): pin pending next-action copy to registered kinds #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| Related-node walks include team and organization mention edges. Click an | ||
| R&R team to open sibling posts. Thread-group run lists honor knowledge_cutoff. | ||
| Failed period-report rows rebuild the report; a pending TEPP corpus | ||
| does not claim a calibrated measurement. | ||
| does not claim a calibrated measurement. A pending lineage row says | ||
| reconstruction has not started yet. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1451,28 +1451,48 @@ function analysisRunCaption(run: AnalysisRun): string { | |
| } | ||
|
|
||
| /** | ||
| * Next action for a failed run on the home list. | ||
| * Next action for a pending or failed run on the home list and detail. | ||
| * | ||
| * The machine `failure_code` stays on detail history (ADR 0014). Copy | ||
| * is kind-specific so a failed lineage reconstruction is not mistaken | ||
| * for a missing TEPP transport. | ||
| * is pinned to registered kinds so a pending TEPP row is not mistaken | ||
| * for reconstruction, and a failed lineage row is not mistaken for a | ||
| * missing TEPP transport. | ||
| */ | ||
| function analysisRunNextAction(run: AnalysisRun): string | null { | ||
| if (run.status_code === "analysis_status_pending") { | ||
| return "Open this run to confirm which posts it will use. Reconstruction has not started yet."; | ||
| } | ||
| if (run.status_code !== "analysis_status_failed") { | ||
| return null; | ||
| } | ||
| switch (run.run_kind_code) { | ||
| case "analysis_run_tepp": | ||
| return "Open this run to see why it failed, then connect the measurement service and re-run."; | ||
| case "analysis_run_lineage": | ||
| return "Open this run to see why it failed, then retry reconstruction from a current snapshot."; | ||
| case "analysis_run_report": | ||
| return "Open this run to see why it failed, then rebuild the period report from a current snapshot."; | ||
| switch (run.status_code) { | ||
| case "analysis_status_pending": | ||
| switch (run.run_kind_code) { | ||
| case "analysis_run_lineage": | ||
| return "Open this run to confirm which posts it will use. Reconstruction has not started yet."; | ||
| case "analysis_run_tepp": | ||
| return "Open this run to confirm which posts TEPP will measure. Measurement has not started yet — this is not a calibrated result."; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This pending-TEPP disclaimer never enters the list accessible name. The list button still sets Put the next-action in the accessible name ( |
||
| case "analysis_run_report": | ||
| return "Open this run to confirm which posts the period report will use. The report has not been built yet."; | ||
| default: { | ||
| const unexpected: never = run.run_kind_code; | ||
| return unexpected; | ||
| } | ||
| } | ||
| case "analysis_status_failed": | ||
| switch (run.run_kind_code) { | ||
| case "analysis_run_tepp": | ||
| return "Open this run to see why it failed, then connect the measurement service and re-run."; | ||
| case "analysis_run_lineage": | ||
| return "Open this run to see why it failed, then retry reconstruction from a current snapshot."; | ||
| case "analysis_run_report": | ||
| return "Open this run to see why it failed, then rebuild the period report from a current snapshot."; | ||
| default: { | ||
| const unexpected: never = run.run_kind_code; | ||
| return unexpected; | ||
| } | ||
| } | ||
| case "analysis_status_running": | ||
| case "analysis_status_succeeded": | ||
| case "analysis_status_cancelled": | ||
| case null: | ||
| return null; | ||
| default: { | ||
| const unexpected: never = run.run_kind_code; | ||
| const unexpected: never = run.status_code; | ||
| return unexpected; | ||
| } | ||
| } | ||
|
|
@@ -1648,6 +1668,7 @@ function AnalysisRunsPanel({ | |
| if (runs === null) return <p>Loading analysis runs...</p>; | ||
|
|
||
| const corpusHint = selected ? analysisRunCorpusHint(selected) : null; | ||
| const selectedNextAction = selected ? analysisRunNextAction(selected) : null; | ||
|
|
||
| return ( | ||
| <section className="popup-section lineage-home"> | ||
|
|
@@ -1699,6 +1720,7 @@ function AnalysisRunsPanel({ | |
| {selected && ( | ||
| <div className="popup-section"> | ||
| <h3>{analysisRunCaption(selected)}</h3> | ||
| {selectedNextAction && <p className="post-meta">{selectedNextAction}</p>} | ||
| <p className="post-meta"> | ||
| Cutoff {selected.knowledge_cutoff.slice(0, 10)} | ||
| {" · "} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only locks the absence of the lineage sentence. A pending TEPP row that showed the period-report sentence, or no next-action at all, still passes.
Missing on this head: a positive lock of
Measurement has not started yet — this is not a calibrated result; a pending-report fixture/test; running/cancelled TEPP corpus tests. The nearbygetByRolename is still caption-only, which locks the AccName hole this PR leaves open.