Skip to content

feat(aws-control): name the searched region on the no-drive setup card - #24934

Merged
chenmingwei23 merged 1 commit into
mainfrom
crew/issue-triage/fix-24913-searched-region
Oct 27, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
crew/issue-triage/fix-24913-searched-region

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When AWS Control finds no drive, the setup card names the region it searched, so an owner knows a drive in another region of the same account will not show there.

Since PR #24892 the drive status returns {"exists": false, "searched_region": "<region>"}. The dashboard ignored the field. The setup card said only "set up a drive" and offered to create one, so an owner whose profile points at another region could make a second drive in the same account.

Why it matters

The drive is one per AWS account, but discovery looks in one region. Without the region on screen, the owner decides to create a drive without knowing where it looked.

Not a goal

  • No backend change and no change to how a drive is created or found.
  • No new AWS call or IAM change.
  • No search across regions.

What changed (motivation → approach → change)

The status already carries the searched region; only the screen was missing it. DrivePaneGate now passes searched_region to SetupCard. When it is present, the card adds one line: "No drive found in {{region}}. Only this region was searched, so a drive in another region of this account will not show here." When an older backend leaves the field out, the card shows exactly today's text. The DriveStatus type gains the optional field. The new key apps.awsControl.console.setup_searched_region is in en.manual.json, every translated catalog, and the regenerated en-XA pseudolocale.

Decision (most conservative): the line is added under the existing body text rather than replacing it, so the create button and today's copy stay as they are.

Backwards compatibility

Compatible: the field is optional; a payload without it renders the card unchanged.

Removes nothing: the diff only adds a line, an optional type field and a catalog key.

Tests

Both #24913 tests fail with the production hunks reverted (checked locally) and pass with them.

Proof: not provable -- frontend test

Manual verification

Built the SPA and loaded /aws-control/files in Chromium with stubbed API replies: the region line shows when searched_region is set and is absent when it is not (screenshots below).

Screenshots / video

Built SPA, AWS Control Files pane, no drive yet, dark theme (fixtures, no AWS).

With searched_region: "us-west-2": the new line sits under the body text.

Setup card naming the searched region

Older backend, no searched_region: the card is unchanged.

Setup card without a searched region

Related Issues

Closes #24913

Related: #24887 / PR #24892.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Screenshot note: this host is too short on memory (load above 80 on 16 cores) to build the SPA for a browser capture, so no screenshot is attached yet. The card renders one extra muted line under the existing body text, "No drive found in . Only this region was searched, so a drive in another region of this account will not show here.", only when the drive status carries searched_region. Unit tests in ConsoleView.test.tsx and AwsControlPage.test.tsx cover both the present and absent cases. A maintainer may add the no-screenshots label or ask for a capture from a less loaded host.

🤖 AI-assisted comment 🤖

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 18f27e979df99a2bd16bb0c819e72261cd6efeb1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this is an additive, optional line on the setup card that the old backend payload doesn't affect, and the description includes two screenshots of this revision.

[DESIGN-REVIEWED] 18f27e9

Description read

[DESCRIPTION-READ] 15ce9e1798385bdfa37938f07689e75d29ddb7bc6e798bdc3cfed680dd0c298e

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 18f27e979df99a2bd16bb0c819e72261cd6efeb1 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

The backend already sends searched_region (routes_parts/drive.py:68). This change only shows it on the card, with one new consumer and no change to any default or existing copy.

What this change ships

Inventory (3 items) — 3 justified

Intent: when no drive is found, the owner sees which region was searched, so they don't create a second drive in another region. This is an ADDITION.

  1. The no-drive setup card adds a line naming the searched region, below the existing body text — justified
  2. The drive status type accepts an optional searched_region and passes it to the card — justified
  3. A new string setup_searched_region is added to every locale catalog — justified

[FIRST-PRINCIPLES-REVIEWED] 18f27e9

Description read

[DESCRIPTION-READ] 4ec14c8e3f2f7204d2e07390c47a9a18b91635ce21ca9cf776d352d89ea97075

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 18f27e979df99a2bd16bb0c819e72261cd6efeb1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. Both states of the new line are in the screenshots, and the blind reader understood it as intended: "it only looked in one place, and I might already have a drive somewhere else".

Notes

  • setup_searched_region tells the owner what was checked but gives no next step. The reader said "nothing tells me how to search another region or whether I should", and that it "makes me nervous about creating a second drive." Add a short follow-on that names how to check another region, such as switching the profile's region.

[UX-REVIEWED] 18f27e9

Description read

[DESCRIPTION-READ] 6d9002dc553e2c049ea0aeaa04d96a100f83d098308f3af645bd9ca7cb79d317

That sha256 names everything this verdict read: the PR description, plus the 5 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 18f27e979df99a2bd16bb0c819e72261cd6efeb1 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 18f27e9

Verdict parsed from the review's SHA-scoped output markers for commit 18f27e979df99a2bd16bb0c819e72261cd6efeb1.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 18f27e979df99a2bd16bb0c819e72261cd6efeb1 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 18f27e979df99a2bd16bb0c819e72261cd6efeb1 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 18f27e9

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 18f27e979df99a2bd16bb0c819e72261cd6efeb1 false-positive: <reason, 20 to 500 characters>

@iamwhatever
iamwhatever force-pushed the crew/issue-triage/fix-24913-searched-region branch from a7d8ae7 to ab68bc8 Compare October 27, 2026 18:32
@iamwhatever

iamwhatever commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: findBy behind the accounts -> drive -> setup-card query chain

  • span=6a49ceac1919 Give the chained-query wait an explicit ceiling

fixed in ab68bc8: the findByTestId now passes namedCeiling('DRIVE_SETUP_READY', 5000) as its third argument, with a comment naming the accounts -> drive -> setup-card chain.
Class sweep: this is the only findBy the PR adds; the SetupCard tests in ConsoleView.test.tsx render synchronously and use getByTestId.

🤖 AI-assisted comment 🤖

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 27, 2026
@iamwhatever
iamwhatever force-pushed the crew/issue-triage/fix-24913-searched-region branch from ab68bc8 to 18f27e9 Compare October 27, 2026 19:18
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 27, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Review-ready at head 18f27e9: PR Readiness passed (label readiness: passed), 109 checks with 0 failing, mergeable, GPT and Opus lanes fresh on this head, and the one GPT finding (span 6a49ceac1919) answered as fixed. Screenshots of the setup card with and without searched_region are in the description.

Note: origin/main has gained 17 commits since this head went green, and some touch the same locale files (new keys only). GitHub still reports the PR as mergeable, so I have not rebased; a maintainer may ask for a re-sync before merging.

Waiting on a maintainer review. I have not merged, approved or enabled auto-merge.

🤖 AI-assisted comment 🤖

@chenmingwei23
chenmingwei23 merged commit 6256fc4 into main Oct 27, 2026
161 of 164 checks passed
@chenmingwei23
chenmingwei23 deleted the crew/issue-triage/fix-24913-searched-region branch October 27, 2026 23:09
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 27, 2026
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.

AWS Control: show the searched region on the no-drive setup card

2 participants