Skip to content

test(conversations): expect attachment object urls - #4558

Merged
senamakel merged 3 commits into
tinyhumansai:mainfrom
senamakel:fix/conversation-attachment-object-url-tests
Jul 5, 2026
Merged

senamakel merged 3 commits into
tinyhumansai:mainfrom
senamakel:fix/conversation-attachment-object-url-tests

Conversation

@senamakel

@senamakel senamakel commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Updates conversation attachment tests for the merged object URL image renderer.
  • Uses a valid tiny PNG data URI fixture so the renderer passes base64 validation.
  • Mocks URL.createObjectURL/URL.revokeObjectURL and asserts rendered blob: image URLs.

Problem

  • PR fix(codeql): break remaining release alert flows #4556 changed image attachment rendering from direct data URIs to validated Blob object URLs for CodeQL hardening.
  • Two existing attachment tests still selected images by the original data URI and used invalid placeholder base64, causing the frontend runner to fail after merge.

Solution

  • Install object URL mocks around the attachment test group.
  • Replace invalid placeholder PNG data with a valid base64 fixture.
  • Assert the expected object URL image source and object URL creation count.

Submission Checklist

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy
  • Diff coverage ≥ 80% — deferred to GitHub runners per maintainer instruction; local CI/tests intentionally not run.
  • N/A: Coverage matrix updated — test-only follow-up, no feature row changed.
  • N/A: All affected feature IDs from the matrix are listed in the PR description — no matrix feature IDs changed.
  • No new external network dependencies introduced (mock backend used per Testing Strategy)
  • N/A: Manual smoke checklist updated — test-only follow-up.
  • N/A: Linked issue closed via Closes #NNN — no issue.

Impact

  • Test-only change.
  • No runtime, migration, or user-visible behavior impact.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fix/conversation-attachment-object-url-tests
  • Commit SHA: 306a81e

Validation Run

  • pnpm --dir app exec prettier --write src/pages/__tests__/Conversations.attachments.test.tsx
  • N/A: pnpm --filter openhuman-app format:check — deferred to GitHub runners per maintainer instruction
  • N/A: pnpm typecheck — deferred to GitHub runners per maintainer instruction
  • Focused tests: deferred to GitHub runners per maintainer instruction
  • N/A: Rust fmt/check — no Rust changes
  • N/A: Tauri fmt/check — no Tauri changes

Validation Blocked

  • command: Local CI/test commands
  • error: Deferred per maintainer instruction: “defer tests go github runners. don't run Ci tests ehre.”
  • impact: GitHub PR checks are authoritative for this follow-up.

Behavior Changes

  • Intended behavior change: None
  • User-visible effect: None

Parity Contract

  • Legacy behavior preserved: Tests now match the current hardened image rendering path.
  • Guard/fallback/dispatch parity checks: N/A

Duplicate / Superseded PR Handling

  • Duplicate PR(s): N/A
  • Canonical PR: This PR
  • Resolution (closed/superseded/updated): N/A

@senamakel
senamakel requested a review from a team July 5, 2026 08:24
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 461e6f0e-bb77-48c6-a470-9731f7785d79

📥 Commits

Reviewing files that changed from the base of the PR and between ad106b5 and 8edb056.

📒 Files selected for processing (1)
  • app/src/pages/__tests__/Conversations.attachments.test.tsx

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 306a81e48d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/src/pages/__tests__/Conversations.attachments.test.tsx
@senamakel
senamakel merged commit 5e8d665 into tinyhumansai:main Jul 5, 2026
15 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.

1 participant