Skip to content

release - #2352

Merged
charlietlamb merged 6 commits into
mainfrom
dev
Jul 22, 2026
Merged

release#2352
charlietlamb merged 6 commits into
mainfrom
dev

Conversation

@charlietlamb

@charlietlamb charlietlamb commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Allow dropped license pools during plan transitions, normalize virtual license products for previews, and fix long checkout URL truncation in the dashboard.

  • Bug Fixes
    • Billing: Only block ambiguous active assignment mappings; dropped pools are released during compute to allow plan changes without manual cleanup.
    • Catalog: Ensure virtual products include default empty prices and entitlements, enabling customization of same-batch license plans in previews; added an integration test to cover this.
    • Dashboard: Constrain the Copy button wrapper so long checkout URLs are left-aligned and truncate at the end instead of hiding the start.

Written for commit 7d8f975. Summary will update on new commits.

Review in cubic

Greptile Summary

This PR adjusts license-plan previews and improves URL display behavior. The main changes are:

  • Bug fixes: Allow dropped license pools to release assignments during computation.
  • Bug fixes: Initialize required arrays on virtual catalog products.
  • Improvements: Add coverage for customized same-batch license plans.
  • Improvements: Improve long URL sizing and alignment in the success view.

Confidence Score: 4/5

The integration-test schema import should use the package entry point that exports it.

  • The production changes have concrete handling for dropped pools and complete virtual-product shapes.
  • The new test can fail to compile or load when the root shared barrel does not expose the imported schema.

server/tests/integration/licenses/catalog-update/license-catalog-response.test.ts

Important Files Changed

Filename Overview
server/src/internal/billing/v2/actions/attach/errors/handleLicenseErrors/handleDroppedLicenseErrors.ts Skips active-assignment errors for intentionally dropped pools while retaining ambiguous-mapping checks.
server/src/internal/catalog/actions/catalogPlanPreflight.ts Adds required empty price and entitlement arrays to fresh virtual products.
server/tests/integration/licenses/catalog-update/license-catalog-response.test.ts Adds same-batch license customization coverage but may import the request schema from the wrong package entry point.
vite/src/components/forms/shared/UrlSuccessView.tsx Adds width constraints and left alignment for long copyable URLs.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
server/tests/integration/licenses/catalog-update/license-catalog-response.test.ts:6
**Schema Missing From Root Barrel**

The server alias resolves `@autumn/shared` to `shared/index.ts`, while this schema is exposed through the `@autumn/shared/publicApiSchemas` subpath. If the root barrel does not re-export it through another chain, the integration-test target fails to type-check or load.

```suggestion
import { CatalogUpdateParamsSchema } from "@autumn/shared/publicApiSchemas";
```

Reviews (1): Last reviewed commit: "Merge pull request #2351 from useautumn/..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used:

  • Context used - When generating the key changes section of the sum... (source)

charlietlamb and others added 6 commits July 22, 2026 10:28
Button wraps children in an unconstrained inline-flex span, so the long
checkout URL sized that wrapper past the button and got clipped on both
ends by justify-center, hiding the start of the URL.

Constrain the wrapper from the call site so the URL can shrink, and
left-align it so the ellipsis lands at the end.
…ight

fix(catalog): normalize virtual license products
…cation

fix(dashboard): truncate long checkout URL from the start
fix(billing): allow dropped license pools to transition
@capy-ai

capy-ai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Capy auto-review is paused for this organization because the usage-cycle auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

CatalogPreviewUpdateResponse,
CheckResponseV3,
} from "@autumn/shared";
import { CatalogUpdateParamsSchema } from "@autumn/shared";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Schema Missing From Root Barrel

The server alias resolves @autumn/shared to shared/index.ts, while this schema is exposed through the @autumn/shared/publicApiSchemas subpath. If the root barrel does not re-export it through another chain, the integration-test target fails to type-check or load.

Suggested change
import { CatalogUpdateParamsSchema } from "@autumn/shared";
import { CatalogUpdateParamsSchema } from "@autumn/shared/publicApiSchemas";
Prompt To Fix With AI
This is a comment left during a code review.
Path: server/tests/integration/licenses/catalog-update/license-catalog-response.test.ts
Line: 6

Comment:
**Schema Missing From Root Barrel**

The server alias resolves `@autumn/shared` to `shared/index.ts`, while this schema is exposed through the `@autumn/shared/publicApiSchemas` subpath. If the root barrel does not re-export it through another chain, the integration-test target fails to type-check or load.

```suggestion
import { CatalogUpdateParamsSchema } from "@autumn/shared/publicApiSchemas";
```

How can I resolve this? If you propose a fix, please make it concise.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 4 files

Confidence score: 3/5

  • In server/tests/integration/licenses/catalog-update/license-catalog-response.test.ts, the assertion on preview.plan_changes[1]?.plan?.licenses targets a field that the previewUpdateCatalog path does not populate, so this test can fail for the wrong reason or pass without validating real license changes. That creates regression risk in catalog-update behavior and CI stability—update the assertion to the actually populated preview field (as used in the other utility tests) before merging.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="server/tests/integration/licenses/catalog-update/license-catalog-response.test.ts">

<violation number="1" location="server/tests/integration/licenses/catalog-update/license-catalog-response.test.ts:154">
P1: The test asserts `preview.plan_changes[1]?.plan?.licenses`, but `plan` is never populated on `CatalogPlanPreview` by the `previewUpdateCatalog` call path. Looking at the utility tests in this file, other tests use expand value "n" which matches a real expand key used by the system to return nested plan fields. The expand value `plan_changes.plan` does not match any existing expand logic that would populate a `plan` property on the plan change object. The optional chaining hides this — the assertion always evaluates to `undefined` and vacuously passes. Drop the expand and access `plan_changes[1]` fields directly, or use a known expand key like "plan_changes.n" that maps to `plan_changes` → `plan_changes.n` → `n` (the expand key used by other tests in this same file).</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

},
],
});
const preview = await previewUpdateCatalog({ ctx: defaultCtx, params });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1: The test asserts preview.plan_changes[1]?.plan?.licenses, but plan is never populated on CatalogPlanPreview by the previewUpdateCatalog call path. Looking at the utility tests in this file, other tests use expand value "n" which matches a real expand key used by the system to return nested plan fields. The expand value plan_changes.plan does not match any existing expand logic that would populate a plan property on the plan change object. The optional chaining hides this — the assertion always evaluates to undefined and vacuously passes. Drop the expand and access plan_changes[1] fields directly, or use a known expand key like "plan_changes.n" that maps to plan_changesplan_changes.nn (the expand key used by other tests in this same file).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At server/tests/integration/licenses/catalog-update/license-catalog-response.test.ts, line 154:

<comment>The test asserts `preview.plan_changes[1]?.plan?.licenses`, but `plan` is never populated on `CatalogPlanPreview` by the `previewUpdateCatalog` call path. Looking at the utility tests in this file, other tests use expand value "n" which matches a real expand key used by the system to return nested plan fields. The expand value `plan_changes.plan` does not match any existing expand logic that would populate a `plan` property on the plan change object. The optional chaining hides this — the assertion always evaluates to `undefined` and vacuously passes. Drop the expand and access `plan_changes[1]` fields directly, or use a known expand key like "plan_changes.n" that maps to `plan_changes` → `plan_changes.n` → `n` (the expand key used by other tests in this same file).</comment>

<file context>
@@ -66,6 +69,102 @@ test.concurrent(
+				},
+			],
+		});
+		const preview = await previewUpdateCatalog({ ctx: defaultCtx, params });
+
+		expect(preview.plan_changes).toHaveLength(2);
</file context>

@charlietlamb
charlietlamb merged commit 8fbef1c into main Jul 22, 2026
21 of 23 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