Add source-linked Data repository assets - #302
Conversation
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughData quality surface API에 attachment 기반 repository assets 기능을 추가합니다. 오브스큐레이션된 키와 정제된 표시 텍스트로 민감한 데이터를 보호하며, 백엔드 쿼리와 집계, 프론트엔드 UI 렌더링, 그리고 전체 스택 검증을 포함합니다. ChangesRepository Assets in Data Quality Surface API
🎯 3 (Moderate) | ⏱️ ~25 minutes
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
backend/api/data.py (1)
295-326: 💤 Low value
rows파라미터에 타입 어노테이션 추가 권장함수 시그니처에서
rows의 타입이 명시되지 않아 코드 가독성과 IDE 지원이 저하됩니다. 반환 타입에는list[DataRepositoryAsset]가 명시되어 있으므로 입력도 일관되게 타이핑하는 것이 좋습니다.♻️ 타입 어노테이션 추가 제안
-def _repository_assets(rows) -> list[DataRepositoryAsset]: +def _repository_assets( + rows: list[tuple[Attachment, Email]], +) -> list[DataRepositoryAsset]:🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/api/data.py` around lines 295 - 326, The _repository_assets function lacks a type annotation for the rows parameter; add a concrete typing such as rows: Iterable[tuple[Attachment, Email]] or rows: list[tuple[Attachment, Email]] (matching your domain classes used as attachment and email in the loop) so callers and IDEs get proper hints, and ensure you import the appropriate typing (Iterable or list) and the Attachment/Email types or forward references if needed; keep the existing return type list[DataRepositoryAsset] unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@backend/api/data.py`:
- Around line 295-326: The _repository_assets function lacks a type annotation
for the rows parameter; add a concrete typing such as rows:
Iterable[tuple[Attachment, Email]] or rows: list[tuple[Attachment, Email]]
(matching your domain classes used as attachment and email in the loop) so
callers and IDEs get proper hints, and ensure you import the appropriate typing
(Iterable or list) and the Attachment/Email types or forward references if
needed; keep the existing return type list[DataRepositoryAsset] unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 59b7d09b-1a7a-4f62-9cc4-04b3f92532ce
📒 Files selected for processing (9)
AGENTS.mdREADME.mdbackend/api/data.pybackend/tests/test_data_api.pydocs/plans/2026-05-29-data-repository-assets-surface.mdfrontend/src/app/data/page.test.tsxfrontend/src/components/DataLayout.tsxfrontend/tests/e2e/dashboard-branding.spec.tsfrontend/tests/e2e/helpers.ts
Summary
/api/data/quality-surfacewithrepository_assetsderived from scopedemails+attachmentsrows.provider_write_executed=false.Source and Safety Boundaries
naruon_session_tokenbearer sessions and omit public identity headers.Subagent
agent thread limit reached. I proceeded locally and kept the delegated scope documented.Verification
PYTHONDONTWRITEBYTECODE=1 python3 -m pytest backend/tests/test_data_api.py -q->3 passed, 1 skippedPYTHONDONTWRITEBYTECODE=1 python3 -m pytest backend/tests/test_data_api.py backend/tests/test_auth_real.py -q->48 passed, 1 skippedPYTHONDONTWRITEBYTECODE=1 python3 -m pytest -qinbackend/->512 passed, 14 skippedPYTHONDONTWRITEBYTECODE=1 python3 -m bandit -r backend/ -x backend/tests/ -q-> passnpm test -- --run src/app/data/page.test.tsx->7 passednpm test->22 passed,103 passednpm run lint-> passnpm run typecheck-> passenv -u FORCE_COLOR -u NO_COLOR PLAYWRIGHT_PORT=18131 npm run test:e2e -- --project=desktop tests/e2e/dashboard-branding.spec.ts -g "Data quality"->1 passedScreenshots Inspected
data-quality-desktop-repository-assets.png: source-linked repository assets visible; no clipped provider-write text after fix.data-quality-tablet-pipeline.png: tablet pipeline layout scrolls/frames correctly.data-quality-mobile-scroll.png: mobile scroll reaches quality checks with bottom nav intact.data-quality-mobile-hamburger.png: mobile drawer shows Data and all primary destinations.Prior PR Follow-up
26632458842was still in progress when this PR was opened; pending checks are tracked as wait states, not hard blockers.