← Back to Pull requests

fix(platform): enable custom logo file upload (AAP-65130) #3908

Open
unknown opened this pull request with 221 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 16, 2026 18:51 UTC
Author

Summary

Fixes AAP-65130: users could not upload a custom logo from Settings → Platform gateway → Edit.

Gateway OPTIONS exposes custom_logo as a CharField (type: "string"), so the edit form rendered a plain text input with no Browse button. This PR special-cases custom_logo to use PageFormFileUpload and converts the selected File to a data URL before PUT.

Type of Change

  • Bug fix

  • Enhancement

  • Tests

  • Documentation

  • Other (please specify)
  • Risk Analysis - REQUIRED

  • High — Broad platform impact (e.g., SWR config, shared framework components, authentication, routing, API wrappers, build/bundler config). Changes affect multiple workspaces or could cause widespread regressions.

  • Medium — Scoped but cross-cutting (e.g., shared utility functions, changes to multiple pages within one workspace, component library updates, test infrastructure). Limited blast radius but touches common code paths.

  • Low — Narrowly scoped (e.g., single page fix, styling tweak, documentation, test-only changes, copy/string updates). Minimal risk of unintended side effects.
  • Testing

    Manual Testing

    1. Log in as admin → Settings → Platform gateway → Edit
    2. Under Custom Login, confirm Custom logo shows Browse / Clear
    3. Upload a GIF, PNG, or JPEG → Save
    4. Log out and confirm the custom logo appears on the login page

    Screenshots

    BEFORE:

    <img width="1685" height="317" alt="Screenshot 2026-11-17 at 12 17 49 AM" src="https://github.com/user-attachments/assets/9f0569c3-8ee7-4010-bd82-867a77bd0af6" />

    AFTER:

    <img width="1678" height="339" alt="Screenshot 2026-11-17 at 12 18 28 AM" src="https://github.com/user-attachments/assets/c3471034-2f4d-4d36-bfb9-9468d7ebffc5" />

    JIRA: AAP-65130

    Diff: 221 lines (+165 / -56) across 2 files Reviewer: redhat-chai-bot Review duration: 1208m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 221 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.323
    Real PR Conversation Timeline
    1 comments
    "Review active on #3908"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 36.8% (MEDIUM) · Higher = larger blast radius
    36.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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 19.6% · Safe to merge
    19.6%