← Back to Pull requests

fix: 어드민 MoreLink 제거 및 인증서 이미지 로딩 실패 fallback (#420) #426

Merged
miceplanscom-lab merged 2 files (29 lines) on Oct 02, 2026 02:18 UTC
View on GitHub
miceplanscom-lab miceplanscom-lab commented on Oct 02, 2026 01:47 UTC
Author

Closes #420

한줄요약: 사용처 없는 MoreLink를 제거하고, 인증서 이미지 로딩 실패 시 placeholder를 보여준다.

Summary


죽은 코드 정리 + presigned URL 만료/네트워크 실패 시 깨진 이미지 대신 안내.

Changes


  • parts.tsx: MoreLink 삭제 (어드민 내 참조 0건)

  • AdminCertificatesScreen.tsx: 썸네일/원본 <img>에 onError → placeholder ("불러오기 실패" / "원본을 불러오지 못했어요.")
  • Implementation Details


    실패 URL을 state로 기억하고 fileUrl이 바뀌면 자동으로 초기화(행 전환 시 리셋).

    Testing

  • lint (변경 파일 eslint)

  • formatting (변경 파일 prettier)

  • typecheck (변경 파일 관련 오류 0건 — 워크트리에서 api-client dist가 오래돼 무관한 기존 오류가 있어 CI에서 최종 확인)

  • unit tests and existing coverage command (front 테스트 없음, 미실행)

  • api-client, front, server build (미실행, CI 확인)

  • secret scan and production dependency audit (미실행, CI 확인)

  • QUALITY_GATE_PASS
  • Acceptance Criteria

  • MoreLink 참조 0건

  • 이미지 로드 실패 시 placeholder 표시 (브라우저 수동 확인은 미실시)
  • AI Review

    미실시.

    Risk / Regression Points

    LOW — front 표시 로직만 변경.

    Human reviewer focus


    신규 placeholder 문구 2개가 적절한지 확인.

    Diff: 29 lines (+21 / -8) across 2 files Reviewer: claude[bot] Review duration: 30m
    All Vouch review confidence checks passed
    Residual risk 0.07 = Change Risk (0.25) × (1 − Review Confidence (0.72)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.25 · 29 lines diff across 2 files
    0.25
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.56 · 3 substantive comment(s)
    0.56
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    72%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.203
    Real PR Conversation Timeline
    4 items
    qodo-code-review[bot] qodo-code-review[bot] commented on Oct 02, 2026 01:47 UTC
    Bot

    <!-- qodo:billing-blocked -->

    ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

    vercel[bot] vercel[bot] commented on Oct 02, 2026 01:47 UTC
    Bot

    [vc]: #c01X29aHK8beJSDactO2JESqkHMiDINZYUua1C3mWtc=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJkZW1vY2hhbCIsInByb2plY3RJZCI6InByal80YVJiRUpnMnBMWnpES29ZdDZSNk81ZEdyNzlhIiwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL21pY2VwbGFucy9kZW1vY2hhbC85OFJtZHh1U0NNeHpGY0RQdWpXUjladXV1SjFmIiwicHJldmlld1VybCI6ImRlbW9jaGFsLWdpdC1maXgtNDIwLW1pY2VwbGFucy52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IkRFUExPWUVEIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6ImRlbW9jaGFsLWdpdC1maXgtNDIwLW1pY2VwbGFucy52ZXJjZWwuYXBwIn0sInJvb3REaXJlY3RvcnkiOiJmcm9udCJ9XX0=
    The latest updates on your projects. Learn more about Vercel for GitHub.

    | Project | Deployment | Actions | Updated |
    | :--- | :----- | :------ | :------ |
    | <a href="https://vercel.com/miceplans/demochal"><sup><img src="https://vercel.com/api/www/avatar?projectId=prj_4aRbEJg2pLZzDKoYt6R6O5dGr79a&teamId=team_N7zXtLCHGChh8iY3TTj9bkqY&s=32" width="16" height="16" align="middle" alt="" /></sup></a> demochal | !Ready Ready | Preview | <relative-time datetime="2026-10-02T01:49:07.211Z">Oct 2, 2026 1:49am UTC</relative-time> |

    claude[bot] claude[bot] commented on code on Oct 02, 2026 01:53 UTC
    Code Review
    front/src/components/admin/AdminCertificatesScreen.tsx:1
    @@ -276,12 +276,22 @@ export function AdminCertificatesScreen() {
     const isPdf = (row: CertificateListRow) => row.fileContentType === 'application/pdf';
     
     function CertificateThumb({ row }: { row: CertificateListRow }) {
    +  // presigned URL 만료·네트워크 실패를 기억한다. URL이 바뀌면 자동으로 초기화된다.
    +  const [failedUrl, setFailedUrl] = useState<string | null>(null);

    한줄요약: CLAUDE.md 컨벤션 기준 아키텍처·보안·정확성 문제 없음 — 머지해도 좋습니다.

    ⚠️ 이 환경에서 gh CLI 실행이 권한 제한되어, PR 전체 요약을 이 파일의 변경 지점에 코멘트로 남깁니다. 우선순위 위반 사항이 없어 인라인 지적은 없습니다.

  • 아키텍처 규칙: 해당 없음 — 이미지 로드 실패 상태를 컴포넌트 로컬 useState로만 관리해 서버 데이터(TanStack Query)와 클라이언트 UI 상태의 경계를 지켰고, API 호출도 orval 생성 클라이언트 경유를 유지합니다.

  • 보안/정책(결제·개인정보·청소년 보호): 해당 없음 — private 원본의 5분 presigned GET 전제와 4분 주기 재조회(FILE_URL_REFRESH_MS)를 그대로 두었고 URL·OCR 결과 등을 로그에 남기지 않습니다. 만료된 이미지를 깨진 썸네일 대신 플레이스홀더로 바꾸는 개선입니다.

  • 정확성: useState가 조기 return보다 앞에 있어 훅 순서가 안정적이고, failedUrl === row.fileUrl 값 비교 덕분에 refetch로 presigned URL이 갱신되면 실패 상태가 자동 초기화됩니다. Thumb/PreviewImage가 styled.img라 onError가 정상 전달되고, 삭제된 MoreLink는 남은 참조가 없어 안전합니다. (일시적 네트워크 오류 시 URL이 갱신되기 전까지 재시도 없이 플레이스홀더가 유지되지만, 주석에 적힌 설계 의도 범위 내로 판단했습니다.)
  • Reviewers
    Assignees
    miceplanscom-lab miceplanscom-lab
    Labels
    risk: low confidence: 72% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 24.8% (LOW) · Higher = larger blast radius
    24.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 72% · Lower = rushed or shallow review
    72%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 6.9% · Safe to merge
    6.9%