Skip to content

docs(changelog): flaky tests flag as flaky in one click#149

Merged
samgutentag merged 3 commits into
mainfrom
sam-gutentag/changelog-flaky-tests-flag-as-flaky-one-click
May 29, 2026
Merged

docs(changelog): flaky tests flag as flaky in one click#149
samgutentag merged 3 commits into
mainfrom
sam-gutentag/changelog-flaky-tests-flag-as-flaky-one-click

Conversation

@samgutentag
Copy link
Copy Markdown
Member

What shipped

A one-click Flag as Flaky button on the test detail page status strip. Click it, optionally add a reason (up to 256 chars), and the test is flagged immediately with an amber banner showing who flagged it, when, and why. Replaces the old hidden "manual monitor" workflow in the Monitors tab.

Source

  • Eng PR: trunk-io/trunk2#3187 (merged 2026-03-10, deploy v126)
  • Linear: TRUNK-17705 (primary), TRUNK-17698 ("Redesigned Manual Flagging Experience" — absorbed duplicate, same feature/PR)
  • Date basis: source eng PR mergedAt (2026-03-10)

Wired into all four sites

  • changelog/2026-03-10-flaky-tests-flag-as-flaky-one-click.mdx (new entry)
  • docs.json (Changelog tab 2026 nav, March-10 slot)
  • changelog/index.mdx (March 2026 <Update>)
  • flaky-tests/changelog.mdx (product index <Update>)

Docs link: https://docs.trunk.io/flaky-tests/detection/flag-as-flaky

🤖 Generated with Claude Code

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 29, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
trunk 🟢 Ready View Preview May 29, 2026, 5:36 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@samgutentag samgutentag added changelog PR touches the changelog (auto-generated drafts, hosting, formatting, indexing). ready to merge Verify docs PR: customers can use this. Ready to publish. labels May 29, 2026
@samgutentag
Copy link
Copy Markdown
Member Author

Verification status (2026-05-28): live

Verified: customers can use this. Ready to publish.

  • Eng PR: trunk-io/trunk2#3187 (merged 2026-03-10, deploy v126)
  • Flag: enableFlakeDetectionVnext (the flag-as-flaky UI rendered behind the flake-detection vnext path)
  • Signals:
    • Flag-removal PR trunk-io/trunk2#3387 "Remove enableFlakeDetectionVnext frontend feature flag and related code" merged 2026-03-27 and is on main. Flag and legacy code deleted means 100% prod rollout.
    • Multiple follow-up vnext PRs (#3206, #3219, #3230, #3234) merged in March, all on main.

Ready to publish. Labeled ready to merge.

@samgutentag samgutentag added the code-verified verify-docs-against-code: all factual claims confirmed in source. label May 29, 2026
@samgutentag
Copy link
Copy Markdown
Member Author

Code verification (2026-05-28): 5 confirmed / 0 contradicted / 0 ambiguous / 0 unverifiable

Claim Verdict Source
"Flag as Flaky" button in the status strip confirmed flag-as-flaky-button.tsx:157
Reason capped at 256 characters confirmed flag-as-flaky-button.tsx:63
Banner shows who flagged it, when, and why confirmed test-metadata-card.tsx:293
One-click "Remove flag" confirmed trunk2#3187 e2e + banner source (see below)
Flag History records flag/unflag events confirmed monitor-events-panel.tsx:503-504

All factual claims in the entry match source. The button/banner/events components were refactored into a repo/[repoId]/ path tree after the eng PR merged (line numbers below reflect current main), but the strings, the 256-char limit, and the behavior are intact.


Source #1 — "Flag as Flaky" button + 256-char reason (confirmed)

File: trunk-io/trunk2/ts/apps/frontend/src/app/(everything-else)/[orgSlug]/flaky-tests/components/flag-as-flaky-button.tsx#L63

const MAX_NOTE_LENGTH = 256;
// ...
                Flag as Flaky        // L157
// ...
                      setNote(e.target.value.slice(0, MAX_NOTE_LENGTH))  // L178
                    maxLength={MAX_NOTE_LENGTH}                          // L185

Reasoning: The button label "Flag as Flaky" is the literal rendered text. The reason input is both hard-capped (maxLength) and slice-truncated to MAX_NOTE_LENGTH = 256 characters, which matches the entry's "up to 256 characters" claim exactly.

Source #2 — amber banner with attribution (confirmed)

File: trunk-io/trunk2/.../repo/[repoId]/test/[testId]/components/test-metadata-card.tsx#L293

                  ? "Manually Flagged as Flaky"

In the eng PR (trunk2#3187) the banner was its own FlaggedAsFlakyBanner component and built its subtitle from by ${status.markedBy} and dayjs(status.updatedAt).fromNow() plus the reason. After the May refactor the banner state moved into the test metadata card, but the who/when/why attribution is preserved.

Reasoning: The banner renders who flagged it (markedBy), when (updatedAt via fromNow()), and the reason, matching the entry's "shows who flagged it, when, and why."

Source #3 — Flag History events (confirmed)

File: trunk-io/trunk2/.../repo/[repoId]/monitor/monitor-events-panel.tsx#L503-L504

                  ? `${event.actorId ?? "Someone"} flagged this test as flaky`
                  : `${event.actorId ?? "Someone"} removed the flaky flag`

Reasoning: The events panel renders human-readable flag/unflag entries, matching the entry's "the events panel records every flag and unflag action in a human-readable Flag History."

samgutentag and others added 3 commits May 28, 2026 23:23
New changelog entry for the one-click Flag as Flaky button on the test
detail page, replacing the old hidden manual-monitor workflow.

Source eng PR: trunk-io/trunk2#3187 (merged 2026-03-10, deploy v126)
Tickets: TRUNK-17705 (primary), TRUNK-17698 (absorbed duplicate)
Date basis: source eng PR mergedAt.

Wired into all four sites: entry .mdx, docs.json nav, changelog/index.mdx,
and flaky-tests/changelog.mdx product index.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the slug: field (URL slug derives from the docs.json path) and
align type:/category: with the rest of the May-2026 changelog entries.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@samgutentag samgutentag force-pushed the sam-gutentag/changelog-flaky-tests-flag-as-flaky-one-click branch from 0a69f3a to 412f336 Compare May 29, 2026 06:23
@samgutentag samgutentag merged commit 0d1b32b into main May 29, 2026
3 checks passed
@samgutentag samgutentag deleted the sam-gutentag/changelog-flaky-tests-flag-as-flaky-one-click branch May 29, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog PR touches the changelog (auto-generated drafts, hosting, formatting, indexing). code-verified verify-docs-against-code: all factual claims confirmed in source. ready to merge Verify docs PR: customers can use this. Ready to publish.

Development

Successfully merging this pull request may close these issues.

1 participant