Skip to content

feat: show linked issue type and id in listTestCases#334

Merged
ruturaj-browserstack merged 2 commits into
browserstack:mainfrom
SavioBS629:feat/tm-linear
Jul 9, 2026
Merged

feat: show linked issue type and id in listTestCases#334
ruturaj-browserstack merged 2 commits into
browserstack:mainfrom
SavioBS629:feat/tm-linear

Conversation

@SavioBS629

Copy link
Copy Markdown
Collaborator

No description provided.

@SavioBS629 SavioBS629 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Claude Code Review (automated) — 1 inline finding(s). Full report in the PR comment below. Verdict: Passed.

Comment thread src/tools/testmanagement-utils/list-testcases.ts
@SavioBS629

Copy link
Copy Markdown
Collaborator Author

Claude Code PR Review

PR: #334Head: be9bbb2Reviewers: stack:code-review

Summary

Extends the listTestCases summary line to append {linked: <issue_type>:<jira_id>, ...} when a test case has linked issues (e.g. Linear/Jira), and adds a vitest file covering the linked and no-issues cases.

Review Table

Priority Category Check Status Notes
High Security No hardcoded secrets or credentials Pass No secrets touched
High Security Authentication/authorization checks present N/A Auth path unchanged
High Security Input validation and sanitization Pass tc.issues ?? [] guards missing field
High Security No IDOR — resource ownership validated N/A No new resource access
High Security No SQL injection (parameterized queries) N/A No DB access
High Correctness Logic is correct, handles edge cases Pass Empty-array case handled & tested
High Correctness Error handling is explicit, no swallowed exceptions Pass Inside existing try/catch → formatAxiosError
High Correctness No race conditions or concurrency issues N/A Pure formatting
Medium Testing New code has corresponding tests Pass Two new vitest cases
Medium Testing Error paths and edge cases tested Pass No-issues case covered
Medium Testing Existing tests still pass (no regressions) Pass Formatting-only, backward compatible
Medium Performance No N+1 queries or unbounded data fetching N/A No new fetches
Medium Performance Long-running tasks use background jobs N/A
Medium Quality Follows existing codebase patterns Pass Matches surrounding (tc: any) style
Medium Quality Changes are focused (single concern) Pass One feature, one test file
Low Quality Meaningful names, no dead code Pass
Low Quality Comments explain why, not what Pass
Low Quality No unnecessary dependencies added Pass None added

Findings

  • File: src/tools/testmanagement-utils/list-testcases.ts:90
  • Severity: Low
  • Reviewer: stack:code-review
  • Issue: links is built as ${i.issue_type}:${i.jira_id} without validating those fields exist. The links ? … guard only checks for an empty array, not falsy field values, so a malformed issue entry (e.g. issues: [{}]) renders {linked: undefined:undefined}.
  • Suggestion: Guard per-issue before mapping, e.g. .filter((i: any) => i?.issue_type && i?.jira_id), so malformed entries are skipped rather than shown as undefined:undefined. Low priority — depends on whether the TM API guarantees these fields when issues is non-empty.

Non-blocking note (not introduced by this PR): the field jira_id holds a Linear identifier for Linear-tracked issues, mirroring the upstream API field name — worth a follow-up only if the API renames it.


Verdict: PASS — focused, backward-compatible, well-tested change; one low-severity robustness nit.

@SavioBS629

Copy link
Copy Markdown
Collaborator Author

Claude Code PR Review

PR: #334Head: 0f094a5Reviewers: stack:code-review

Continues the previous review — changes since be9bbb2 (delta).

Summary

Adds linked-issue labels ({linked: <issue_type>:<jira_id>}) to the listTestCases summary. This delta guards against malformed issue entries and adds a test for that case — resolving the one open finding from the previous review.

Review Table

Priority Category Check Status Notes
High Security No hardcoded secrets or credentials Pass No secrets touched
High Security Authentication/authorization checks present N/A Auth path unchanged
High Security Input validation and sanitization Pass Malformed issue entries now filtered out
High Security No IDOR — resource ownership validated N/A No new resource access
High Security No SQL injection (parameterized queries) N/A No DB access
High Correctness Logic is correct, handles edge cases Pass Malformed/empty issue cases handled & tested
High Correctness Error handling is explicit, no swallowed exceptions Pass Inside existing try/catch → formatAxiosError
High Correctness No race conditions or concurrency issues N/A Pure formatting
Medium Testing New code has corresponding tests Pass Three vitest cases
Medium Testing Error paths and edge cases tested Pass Malformed-entry + no-issues cases covered
Medium Testing Existing tests still pass (no regressions) Pass Formatting-only, backward compatible
Medium Performance No N+1 queries or unbounded data fetching N/A No new fetches
Medium Performance Long-running tasks use background jobs N/A
Medium Quality Follows existing codebase patterns Pass Matches surrounding (i: any) style
Medium Quality Changes are focused (single concern) Pass One feature, one test file
Low Quality Meaningful names, no dead code Pass
Low Quality Comments explain why, not what Pass
Low Quality No unnecessary dependencies added Pass None added

Findings

  • src/tools/testmanagement-utils/list-testcases.ts:90 Low — Unguarded issue fields render undefined:undefined Resolved — this delta adds .filter((i: any) => i?.issue_type && i?.jira_id) before the .map, so malformed entries are skipped, plus a new test ("skips malformed issue entries instead of rendering undefined") asserting the output contains {linked: linear:TES-9} and no undefined.

No open findings. The delta cleanly addresses the prior review with no new issues.


Verdict: PASS — prior low-severity nit fixed and covered by a new test; nothing outstanding.

@ruturaj-browserstack
ruturaj-browserstack merged commit 0afd57a into browserstack:main Jul 9, 2026
2 checks passed
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.

2 participants