Repository navigation
feat(app-sdk): issue list components (useIssues, IssueList, IssueCard) - #34732
Conversation
Design Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)Design-level review of Design-Verdict: PASS cannot evaluate: missing screenshot or recording of the BlockersNo rendered evidence of this revision for the new issue-list surface Notes
[DESIGN-REVIEWED] ce129e9 Description read[DESCRIPTION-READ] 5da3f3731df045f27ce9128a513267ec9ee4c7be5846c703d532417827917c27 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This only adds things: a new SDK hook and two components beside the existing ones, with no default changed. The issue route already exists (#34742), and nothing in the repo already provides an exportable issue list. Notes
What this change shipsInventory (9 items) — 7 justifiedIntent: let an app builder show a paged, filterable issue list from GitHub, GitLab, Jira or Linear without writing the fetching, the states or the safety rules themselves. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] ce129e9 Description read[DESCRIPTION-READ] a8915fb387f5f202b021c4e6956fdc1e12c944e22630ed3aefb96d6a0be7eb62 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing screenshots of the new Evidence gaps
[UX-REVIEWED] ce129e9 Description read[DESCRIPTION-READ] 2c3bf62820f11ad146d09b16a2079536ded216a695d7ac946ced6b9c1b073222 That sha256 names everything this verdict read: the PR description, plus the 3 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: A person should decideWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 1849 lines, more than the 400 it may approve on its own. Additive SDK feature: useIssues, IssueList and IssueCard over the existing POST /api/source/issues route. The fetch choice copies PullRequestPanel: an external app gets its scoped client only when apiPathAllowed covers /api/source/issues, builtin pages use the dashboard client, and otherwise the hook refuses with an AppApiPermissionError and sends no request. The slash-boundary matcher excludes the singular /api/source/issue, and the builtin origin cannot be forged by an external app. The backend accepts cursor null and serves all four providers. Jira and Linear search really do send commentCount 0, so hiding it is correct. Provider text renders as text, links and avatars pass safeHttpUrl, and labelChipStyle validates hex colours. The SDK level moves 5→6 in both mirrors (pinned equal by test_app_sdk_level_mirror). The vendor stub and barrel stay in exact agreement, as appSharedModuleBoundary requires. The API-client order test, plural keys and locales are updated. The new tests cover each added behaviour. No regression, fail-open or data-loss path found. Caveat: the frontend ratchets/i18n, lint and CodeQL checks were still pending at review time, and the full frontend suite was not An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
20d1e5c to
70c75c6
Compare
70c75c6 to
315c4a2
Compare
315c4a2 to
e2309e2
Compare
e2309e2 to
bda7573
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving. I read every product file in the diff (useIssues.ts, IssueList.tsx, IssueCard.tsx, issues/index.tsx, the app-sdk/index.ts and vendor-stub exports, sourceControl.ts, both SDK level files) and skimmed the docs, capture harness, locales and tests.
- One endpoint only. The hook's only request is
POST /api/source/issues: through the app's scoped client (scopedIssuesTransport) for an external app, orapi.fetchIssuesfor a builtin page. Nothing else is called, and the route itself is unchanged. - Fails closed. An external app gets a transport only when
apiPathAllowed(permissions.api, '/api/source/issues')holds, and the singular/api/source/issuedoesn't satisfy it. With no SDK context the hook sends nothing and returns anAppApiPermissionError. The builtin path keys off the host-published identity, never the app. This mirrorsPullRequestPanel. - Provider text is inert. Every title, label, excerpt and name renders as a React text child (no
dangerouslySetInnerHTML). Links and avatars go throughsafeHttpUrl, withrel="noopener noreferrer"andreferrerPolicy="no-referrer". - No regex in product code.
splitLabelsis a plainsplit(','). The only regex in the diff is a trailing-slash trim in the dev capture script. - The capture harness serves Vite on
127.0.0.1only and fabricates every response. - Hiding the comment count for Jira and Linear (whose list APIs report 0) and hiding the filter bar while
rawis set are both good calls.
7d3bf71 to
fe14091
Compare
fe14091 to
ce129e9
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Re-approving at ce129e9. The new push dismissed my approval on 7d3bf71. I compared the two saved diffs, and only two things changed:
- Docs. The guide, the README row and the feature-map rows now say the route serves Linear too, instead of naming its
provider_not_supportederror. A LinearcommentCountis documented as0because its list API reports none. uniqueIssues.IssueListnow merges pages throughuniqueIssues, which keeps the first copy of each issue, keyed byurlorprovider:key. The route pages by offset over a list sorted by update time, so an issue updated after page 1 loaded could show twice. The new test pins one copy.
The rest of the diff is the same as at 7d3bf71. No regex is added, and nothing is live red (the cancelled runs are superseded by newer passes).
Kiro Crew gave App Kit level 6 to the SDK's issue list (kirodotdev/KiroCrew#34732), so the agentReadOnlyDirs seam (kirodotdev/KiroCrew#33589) lands at level 7. Gating on 6 would move the decision record into a data/trust/ that a level-6 host does not fence. Raise READONLY_DIRS_SDK_LEVEL to 7, update the docs and tests that named level 6, and pin that a level-6 host keeps the record where it gates it.
Main's #34732 took App Kit seam level 6 (issue list) and #33589 took level 7 (agentReadOnlyDirs, backend SDK), so permissions.bots moves to level 8 in both mirrors (app_sdk_level.py, sdkLevel.ts), api-reference.md and app-kit-platform.md §32c. Other conflicts were additive: manager_uninstall.py keeps both imports, and the feature-map rows and the api-reference level list keep both sides' entries.
Problem / Motivation
Goal: Let any Kiro Crew app list, search and show issues from GitHub, GitLab, Jira and Linear with one SDK hook and two ready-made components.
An app builder who wants an issue list today has to write the request, paging, loading and error states, provider badges and the permission check themselves. The dashboard has issue UI (
IssuePanel, Issue Radar's list), but none of it is exported through@kirocrew/app-sdk.Why it matters
Issue lists are one of the most common things a crew app shows. Without shared components, each app rebuilds them, and each copy can get the security details wrong: rendering provider text as HTML, opening a
javascript:link, or calling the gateway without a declared permission.Not a goal
POST /api/source/issues. A separate PR builds it against the same contract; until it lands, the components are tested against a mocked transport.IssuePanel, Issue Radar).What changed (motivation → approach → change)
Apps get
useIssues(query),<IssueList>and<IssueCard>from@kirocrew/app-sdk. The list draws GitHub, GitLab, Jira and Linear issues from oneIssueSummaryshape, in a one-rowcondensedview or a cardexpandedview. It has loading, empty, error and "Load more" states and an optional filter bar for state, assignee ("Assigned to me"), labels and search text.The approach copies
PullRequestPanel. The host's identity picks the transport: an external app's scoped client only when its manifest declares/api/source/issues, the dashboard client for builtin pages, and a refusal with zero requests otherwise. The singular/api/source/issuedoes not enable it. Provider text renders as text. Links and avatars load only from http(s) URLs.The code lives in
website/src/app-sdk/issues/(useIssues.ts,IssueList.tsx,IssueCard.tsx, and the lazy boundary inindex.tsx), exported fromwebsite/src/app-sdk/index.ts. Builtin pages call the newfetchIssuesinwebsite/src/api/client/sourceControl.ts. The components use the request and response types the merged route (#34742) defined inwebsite/src/types/index.sources.ts(IssueSearchRequest,IssueSearchResponse,IssueSummary); this PR adds no types of its own. The route serves all four providers (GitHub, GitLab, Jira and Linear), and the docs say so. Both SDK level mirrors (website/src/app-sdk/sdkLevel.ts,src/kiro_crew/apps/app_sdk_level.py) move from 5 to 6 (main's #35533 took level 5 forctx.app_token()), so an app can tell a host with the issue list from one without it, and the vendor stub lists the new exports. Strings go through the i18n catalog in every locale underwebsite/src/i18n/locales/, with the plural keys registered inwebsite/src/i18n/pluralKeys.json. Docs add a short guide, an api-reference entry, the full-app example and the spec and feature-map rows.website/capture/gains a stubbed harness for the screenshots.Backwards compatibility
Compatible: only new exports, types and an API-client method; nothing existing changes shape.
Removes nothing: the diff only adds exports, components, catalog keys and docs.
Tests
website/src/test/AppSdkIssues.test.tsx(20 tests):/api/source/issueis declared, and with no identity or SDK provider; the hook reports anAppApiPermissionError; builtin pages keep the dashboard client.nextCursorand hides "Load more" on the last page; a filter change starts again from the first page; typed filters debounce; "Assigned to me" sendsassignee: "me".javascript:issue and avatar URLs are neither linked nor fetched; keyboard-reachable rows with accessible names; the condensed row caps label chips at two.query.rawreplaces the structured filters. A Jira or Linear card leaves out the comment count, which their searches never report. An issue the next page repeats after a re-sort (the route pages by offset) is shown once. Each of these tests fails with its fix reverted.Determinism: the file passed 25/25 in 3 shuffled orders (
--sequence.shuffle, seeds 1-3) on the final head, and 21/21 on 5 repeats and 5 shuffled orders before the last two tests were added.Local frontend gate for this push:
tsc,i18n:check, the theme and restyle lints, and 107 scoped test files (the app-sdk, API-client and issue tests plus all ofsrc/i18n). The fullvitest relatedstep was not run locally. Because this diff touchestypes/index.tsand the locale catalogs, it selects most of the frontend suite, and on the shared host (load about 25 on 16 cores) it covered 251 files in 45 minutes while main moved 79 commits. CI's Frontend Tests is the full gate. TwoAppSdkSharedModulesCov80tests timed out locally at 15 s on a cold import under that load; they pass with--testTimeout=60000.Manual verification
Rendered the real components in the stubbed harness (
node capture/shoot-app-sdk-issues.mjs) in dark and light themes at 760px and 320px: both views, "Assigned to me" on, the empty, loading and error states, and the refusal.Screenshots / video
Condensed, dark, with "Assigned to me" on (the toggle is a pill with a person icon, so it does not read as a text box):
Expanded, light:
Error with retry and the agent hand-off, light:
More: other theme and width variants, empty, loading, refusal
Related Issues
N/A — no tracking issue for this work.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)