Skip to content

test(import): catch a break in the unticked no-deploy row or the summed 64 KiB file limit - #304

Merged
GeiserX merged 2 commits into
mainfrom
test/issue-251
Nov 16, 2026
Merged

GeiserX merged 2 commits into
mainfrom
test/issue-251

Conversation

@GeiserX

@GeiserX GeiserX commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

The import page already handles two cases correctly, but no check proves it. A row with nothing to deploy must have no tick. Two files that are each under 64 KiB, but over it together, must be refused. A change could break either one and CI would stay green.

Fix

This adds two cases to frontend/scripts/importer_check.mjs. It changes no app code.

  • The preview fixture gets a not_deployable row that is marked selected. The check asserts the row renders with no tick and still shows its reason.
  • Two files of 32 KiB + 1 byte each. One alone passes (a control). Both together are refused.

Proof

Each new check fails against the matching mutation in frontend/src/render/importer.ts:

  • With not_deployable dropped from rowSelectable: FAIL a row with nothing to deploy has no tick, even when marked selected
  • With the size checked per file instead of summed: FAIL two files over 64 KiB together are refused, though each is under it

With the code restored, npx tsc --noEmit and npm test pass (importer_check: 28 checks passed).

Fixes #251

Summary by CodeRabbit

  • Tests
    • Added checks confirming that non-deployable preview rows retain their explanation without showing a selection checkbox.
    • Expanded file-size limit checks for single files and combined uploads.

…he 64 KiB limit sums all files

The importer already refuses both cases, but the render checks did not
prove it, so a change could break either and CI would stay green.

Add a not_deployable row marked selected to the preview fixture and check
it renders with no tick. Add two files of 32 KiB + 1 byte each: one alone
passes, both together are refused. Each new check fails against the
matching mutation (rowSelectable without the not_deployable test, or the
size checked per file instead of summed).

Fixes #251
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f4fa644 and daf2397.

Files selected for processing: 1

  • frontend/scripts/importer_check.mjs

No actionable comments were generated in the recent review.

Walkthrough

The importer checks now cover not_deployable preview rows and the combined size limit for multiple files.

Changes: Importer checks

Layer / File(s) Summary
Importer regression checks
frontend/scripts/importer_check.mjs
The checks verify that a selected not_deployable row has no checkbox and retains its explanation. They also verify that one 32 KiB + 1 byte file is accepted, while two such files are rejected together.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · previous review f4fa6

This PR adds test coverage only, for the unticked not-deployable import row and the combined 64 KiB file limit, with no production behavior change. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two added test cases: the unticked no-deploy preview row and the summed 64 KiB file limit. The raw summary and PR objectives confirm that the PR adds exactly these two checks to fr…
Linked Issues check Passed [#251] Requirement 1: a not_deployable row must stay unselectable. The diff adds a preview row with state "not_deployable" and selected: true. The new check "a row with nothing to deploy has no tick, …
Out of Scope Changes check Passed The only changed file is frontend/scripts/importer_check.mjs, with +10 lines. Every added line is a fixture row or a check that tests the two objectives in #251. No application code changes. No unrela…
Full details: Title check

Explanation

The title names the two added test cases: the unticked no-deploy preview row and the summed 64 KiB file limit. The raw summary and PR objectives confirm that the PR adds exactly these two checks to frontend/scripts/importer_check.mjs. The title is specific and accurate, though it is long (89 characters).

Full details: Linked Issues check

Explanation

[#251] Requirement 1: a not_deployable row must stay unselectable. The diff adds a preview row with state "not_deployable" and selected: true. The new check "a row with nothing to deploy has no tick, even when marked selected" asserts no checkbox. In importer.ts at head, rowSelectable returns false for not_deployable, so rowHtml emits no checkbox. A second check asserts the reason text is rendered. Requirement 2: the summed 64 KiB limit. The diff adds two 32 KiB + 1 byte files. The control check asserts one file passes. The new check asserts two files together are refused. importFilesProblem sums the UTF-8 byte length of all files via reduce and compares the total to IMPORT_MAX_BYTES, so the combined check is covered. Both cases are new coding tests in the named file. The mutation results (each check failing against its mutation) are author-reported in the PR description. I did not run them. The code logic at head is consistent with those failures.

Full details: Out of Scope Changes check

Explanation

The only changed file is frontend/scripts/importer_check.mjs, with +10 lines. Every added line is a fixture row or a check that tests the two objectives in #251. No application code changes. No unrelated changes appear in the diff.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e59784d and f4fa644.

Files selected for processing: 1

  • frontend/scripts/importer_check.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

…pair check that follows reads right

The control file is 32 KiB plus one byte. Calling it just under half made
the next check, which expects two of them to be refused, look wrong, and
invited a size change that would break it.
@GeiserX
GeiserX merged commit 40c5dde into main Nov 16, 2026
9 checks passed
@GeiserX
GeiserX deleted the test/issue-251 branch November 16, 2026 15:25
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.

test(import): cover not_deployable rows and the combined 64 KiB file limit in the importer checks

1 participant