Skip to content

Name conflicted PR in testing tooltip - #13475

Open
ANONYMOUSZED-beep wants to merge 5 commits into
internetarchive:masterfrom
ANONYMOUSZED-beep:13474/fix/conflict-tooltip-pr-number
Open

Name conflicted PR in testing tooltip#13475
ANONYMOUSZED-beep wants to merge 5 commits into
internetarchive:masterfrom
ANONYMOUSZED-beep:13474/fix/conflict-tooltip-pr-number

Conversation

@ANONYMOUSZED-beep

Copy link
Copy Markdown

Closes #13474

Updates the Testing Environment conflict indicator so its tooltip and accessible label identify the pull request that failed to merge, for example Merge conflict with #13466.

Technical

  • Interpolates the row's PR number through the existing client-side text/sprintf helper.
  • Replaces the old flat mergeConflict string with the parameterized mergeConflictDot key in both JavaScript defaults and the translated Jinja payload.
  • Regenerates openlibrary/i18n/messages.pot with the named %(pr)s placeholder.

Testing

  • node node_modules/jest/bin/jest.js tests/unit/js/testing-status.test.js --runInBand — 15 passed
  • uv run --python 3.14.5 --with-requirements requirements_test.txt pytest openlibrary/tests/fastapi/test_testing_status.py -q — 60 passed
  • pre-commit applicable changed-file hooks — mixed-line-ending, trailing-whitespace, end-of-file-fixer, codespell, djLint formatting/linting, ESLint, check-unused-templates, and generate-pot all passed
  • vite build -c openlibrary/components/vite.config.mjs under Node 24.19.0 — passed (302 modules transformed)
  • git diff --check — passed

Screenshot

Not included: this is a text-only tooltip/ARIA-label change whose rendered value depends on a testing deployment containing a merge-conflicted PR.

Stakeholders

@RayBB

Copilot AI lite review requested due to automatic review settings August 27, 2026 02:00
@github-project-automation github-project-automation Bot moved this to Waiting Review/Merge from Staff in Ray's Project Aug 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the /status Testing Environment merge-conflict indicator so the red-dot tooltip and ARIA label identify the specific pull request that failed to merge (e.g. “Merge conflict with #13466”), improving debuggability for maintainers.

Changes:

  • Replaces the old flat merge-conflict string key with a parameterized mergeConflictDot key.
  • Updates the Vue row component to interpolate the row’s PR number into the tooltip/ARIA label via the existing client-side text/sprintf helper.
  • Regenerates openlibrary/i18n/messages.pot to include the new python-format msgid with a named %(pr)s placeholder.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
openlibrary/components/TestingEnvironment/TestingRow.vue Uses the new mergeConflictDot string key to render a PR-specific tooltip and accessible label.
openlibrary/components/TestingEnvironment/utils.js Updates default English strings to replace the old merge-conflict label with the new parameterized label.
openlibrary/macros/TestingEnvironment.html.jinja Updates the server-provided translated i18n payload to emit the new string key with a placeholder contract compatible with client-side formatting.
openlibrary/i18n/messages.pot Updates extracted translation catalog entries for the new mergeConflictDot string.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 43 to 45
const dotLabel = computed(() => {
if (mergeConflict.value) return props.strings.mergeConflict;
if (mergeConflict.value) return text('mergeConflictDot', `#${props.pr.pr}`);
return liveNow.value ? props.strings.liveNow : props.strings.notLive;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in a5802af. The component now passes the raw PR number, while the # lives in the translatable source string (Merge conflict with #%(pr)s); the JS fallback and generated POT entry were updated to match.

@RayBB

RayBB commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Can you share screenshots please? This should show for unique for each individual PR so the red dot next to the PR says what PR it is conflicting with if there's a conflict.

@RayBB

RayBB commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Currently it says it's own PR number.

Signed-off-by: Arun <ANONYMOUSZED-beep@users.noreply.github.com>
@ANONYMOUSZED-beep

Copy link
Copy Markdown
Author

Thanks for catching that. You are right that the current value is the row’s own PR number. I traced the payload and deploy flow before changing this further: the backend exposes only a per-row merge_conflict boolean, derived from the PR whose merge attempt failed. That PR is merged against the cumulative integration branch (master plus all earlier successful PRs), and the transcript does not identify one specific opposing PR; the conflict may involve master or changes from one or more earlier PRs. So the frontend currently has no truthful “other PR” number to display. The issue’s proposed implementation names the PR that failed to merge, which is why it repeats the row number. Would you prefer the unambiguous wording PR #N failed to merge (conflict), or should this be expanded into backend/deploy-script work to derive and expose conflict provenance? I have not fabricated a screenshot of a distinct PR pairing because the current data cannot produce one. Once you confirm the intended wording/scope, I can post the corresponding UI screenshot. Separately, I pushed a5802af to address Copilot’s localization feedback by moving # into the translated string and passing the raw number. The dependency-free interpolation smoke test renders exactly Merge conflict with #13466; the previous commit’s JavaScript and Python CI checks passed.

@RayBB

RayBB commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

@ANONYMOUSZED-beep you're right. This is trickeir than expected and the original PR description was off from what was desired. I pushed up a commit trying to get it working but sometimes is still a little strange.

Let me follow up with you in the coming days

Generated with Codebuff 🤖\nCo-Authored-By: Codebuff <noreply@codebuff.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting Review/Merge from Staff

Development

Successfully merging this pull request may close these issues.

Name the conflicted PR on the Testing Environment red-dot hover

3 participants