1527 Commits

Author SHA1 Message Date
84b33a7849 fix(auth): close JWT type-confusion bypass (upstream a5affe62)
Ports upstream's "fix: jwt bypass" into our fork. All of Postiz's JWT
tokens (login, password reset, team invite, integration no-auth action,
enterprise billing portal) are signed with the same secret and were only
checked for the presence of certain fields, not their type or mutual
exclusivity - so a token minted for one purpose (e.g. a password-reset or
team-invite link, which a recipient's browser sends on every request)
could be replayed against a different endpoint (billing, integration
actions, enterprise webhooks) that happened to accept a payload shaped
similarly enough.

Tightens every one of those JWT consumers to:
- require the expected fields to be the correct type (string), not just
  truthy
- reject payloads carrying fields unique to a different token kind
  (`timeLimit` = team invite, `expires` = password reset)
- cross-check `provider`/`providerIdentifier` on the no-auth integration
  action endpoint, closing a path where the wrong provider's integration
  could be targeted
- select only `id` from Prisma integration updates instead of returning
  the full row (defense in depth, matches the credential-model rule in
  CLAUDE.md)

No functional change for any legitimate token flow; verified with
`tsc --noEmit` on apps/backend (zero new errors vs the pre-cherry-pick
baseline - the handful of reported errors are pre-existing, unrelated
`noImplicitAny` issues in agent/media/email files this change never
touches).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-26 17:44:31 +03:00
baa9f112db feat(posts): wire up internal approval workflow for queuing posts
Organization.requireApprovalForQueue and Post.pendingApproval existed in
the schema but were never wired up. Adds the ADMIN-only settings toggle,
gates a USER-level member's schedule/publish-now save behind it (held as
a pendingApproval draft instead), and gives ADMIN/SUPERADMIN approve/
reject actions both inline on the calendar card and in a dedicated
Pending Approvals list on the team settings page.
2026-10-24 01:15:39 +03:00
1180195e7c feat(posts): add evergreen content recycling
The /compare/socialbee page shipped last round already claims Postiz
supports recycle-after-days evergreen content rotation, but the feature
didn't exist beyond an unused EvergreenRecycle Prisma model and a
RECYCLE enum value an earlier session had added and never wired up.
Built it for real so that claim is true.

- EvergreenRepository/EvergreenService (mirrors the existing
  PostEngagementRepository/Service pattern) - create/list/pause/
  resume/remove a recycle schedule for an already-published post, plus
  a bounded (25/run) runDueBatch() that clones a due post's
  content/media/settings into a brand-new Post (own id/group/Comments
  thread, CreationMethod.RECYCLE) through the same validatePosts ->
  mapTypeToPost -> createPost pipeline every other post-creation path
  uses. A failed entry is pushed one interval out instead of retried
  immediately; a schedule whose original post was deleted deactivates
  itself.
- New daily Temporal workflow evergreenRecycleWorkflow, modeled on the
  existing bestTimeToPostWorkflow infinite-loop pattern.
- POST|GET /posts/:id/evergreen and PUT|DELETE /posts/evergreen/:id;
  only an already-PUBLISHED post can get a recycle schedule.
- Frontend: a recycle-icon calendar action (published posts only)
  opening a modal to view/add/pause/remove recycle schedules.

Verified apps/backend, apps/orchestrator (nest build) and apps/frontend
(full production next build) all build clean with the already-generated
Prisma client.
2026-10-24 00:54:08 +03:00
6e962170ad feat(posts): wire comment @mentions and assignment end to end
Schema and some DTO/repository scaffolding for this already existed
uncommitted, but nothing called any of it - createPublicComment silently
dropped mentions/assignedToId even if a client sent them.

- createPublicComment resolves mentions/assignedToId against the org's
  team list and rejects anyone not a member, but only for an
  authenticated team member - the public no-auth preview link can never
  set either field, checked server-side rather than relying on DTO
  validation alone.
- New assignComment (+ PUT /posts/comments/:commentId/assign) to change
  or clear a root comment's assignee, same org/root-only restrictions as
  the existing resolveComment.
- New GET /posts/comments/team-members (any authenticated org member)
  backs the mention/assign pickers.
- NotificationService.notifyUser sends a best-effort per-user in-app
  notification on a mention or new assignment.
- Data-exposure fix: getComments is shared by the fully public preview
  GET and a new authenticated GET (/posts/:id/comments) - mentioned
  users' and assignees' names are only included once the caller is
  verified as a logged-in member of the post's own org, so an external
  reviewer on the public link never sees internal team member names.
  Frontend fetches from the authenticated route when logged into the
  owning org, the public route otherwise.
- Frontend: mention checkboxes + assign-to select in the composer,
  reassign control and a "cc:" line of mentioned names on each thread.

Verified apps/backend, apps/orchestrator, and apps/frontend (full
production next build, including /p/[id]) all build clean.
2026-10-24 00:53:49 +03:00
7b4bd338cd feat(public-api): add bulk post create/delete and webhook event filters
Finish an in-progress, uncommitted implementation of two backlog items:

- POST/DELETE /public/v1/posts/bulk (up to 25 creates / 50 deletes per
  call), sharing the single-post create/delete pipeline per item so one
  bad entry never aborts the batch.
- Webhooks.events (additive, empty = every event) lets a webhook
  subscribe to just post.published and/or post.failed instead of
  everything; wired into the publish and failure delivery paths plus a
  frontend checkbox picker.

Verified apps/backend, apps/orchestrator, and apps/frontend all build
clean with the generated Prisma client.
2026-10-24 00:53:35 +03:00
65da57ccc7 feat(frontend): add /compare/* competitor landing pages
Adds 7 bottom-of-funnel SEO/conversion pages (/compare/buffer,
hootsuite, later, socialbee, metricool, publer, mixpost) as a new
public route group under apps/frontend/src/app/(app)/(compare)/,
content-driven from compare.data.ts (pricing pulled from the live
pricing.ts config, competitor numbers from STRATEGY-2026-10-23.md's
sourced research) through a shared compare.page.component.tsx layout:
a 4-box structural-moat checklist, a pricing table, a feature
checklist, a verdict, and FAQ entries.

Also fixes proxy.ts (the app's auth middleware), which redirected
every signed-out visitor to /auth by default - without this, the new
pages would 307 for the exact anonymous-searcher audience they target.
Added /compare/ to the existing public-path allowlist alongside
/p/, /provider/, /uploads/.
2026-10-23 15:35:06 +03:00
88c724bbb3 feat(webhooks): sign, retry, and log webhook deliveries
Backend: adds a per-webhook HMAC-SHA256 signing secret, a WebhookDelivery
log model, and WebhooksService.sendWithRetry (3 attempts, exponential
backoff on 5xx/429/408, always persists the outcome). Wires the
orchestrator's post-publish webhook send and the manual /webhooks/send
test endpoint through it instead of a raw fetch with a silently
discarded failure. Adds secret regeneration and a paginated
deliveries/redeliver API.

Frontend: adds a delivery-log modal (apps/frontend/src/components/webhooks/webhook.deliveries.tsx)
with redeliver, a secret-reveal modal on create/regenerate, and wires
up the previously-dead "Regenerate secret" button.
2026-10-23 15:34:39 +03:00
ba6d7f8796 fix: enable self-hosted Mastodon instances via the custom provider
MastodonCustomProvider was fully implemented but disabled in the
registry and inherited MastodonProvider's requiredEnvVars, which would
have blocked every self-hosted instance behind a "not configured on
this server" check even though it registers its own OAuth app per
instance via externalUrl() and needs no global env vars.

- re-enable registration in integration.manager.ts
- clear inherited requiredEnvVars, add a connect toolTip
- map the mastodon-custom identifier to the existing Mastodon composer
  component so posts to custom instances render instead of falling
  back to the empty composer
2026-10-23 06:54:58 +03:00
3e1980a0db feat: let a team member leave an organization themselves
Previously the only way out of an organization you no longer wanted to
be part of was deleting your entire Postiz account - deleteTeamMember()
is admin-only (and, after the same-level/self fix in this series, never
allows removing yourself), and there was no self-service alternative.

Adds POST /settings/team/leave: OrganizationService.leaveOrganization()
removes the caller from their current org, blocking the two cases that
would otherwise break the account - leaving your only organization (the
auth middleware always needs at least one non-disabled org to fall back
into) and leaving as the organization's only Super Admin (nobody left
able to manage the team or billing). OrganizationRepository gains
countSuperAdmins() to check the latter.

The team settings page (teams.component.tsx) adds a "Leave organization"
button next to "Add another member", shown only when the user belongs to
more than one organization (reusing the 'organizations' SWR cache key
already used by the org switcher), following the existing confirm-dialog
and toast-on-error pattern used by member removal and invites.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 18:34:43 +03:00
d8200a631c fix: show a clear error instead of sending an empty client ID to OAuth providers
On a self-hosted instance with a provider's *_CLIENT_ID/SECRET env vars
unset, "Add channel" still listed it and sent the user straight to the
provider with an empty or literal "undefined" client id - the provider's
own error page gave no hint that a Postiz env var was missing, and X's
failure was swallowed into a generic "Unknown Error" toast with nothing
logged server-side (closes #2238).

Adds a generic, provider-declared check instead of a provider-specific
if/else in shared code: SocialAbstract.missingEnvVars() filters each
provider's declared requiredEnvVars against process.env. Every OAuth
provider from the report now declares its required vars; GMB overrides
missingEnvVars() directly since it's configured via its own creds or a
fallback to YOUTUBE_CLIENT_ID/SECRET, not a plain AND of fixed names.
getIntegrationUrl() checks this before building the auth URL and returns
a message naming the missing vars instead of an empty-client-id redirect,
and its catch block now logs the provider and error message instead of
silently swallowing it. The frontend toast shows that message when
present.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 16:39:13 +03:00
e922a545e7 fix: re-check post state after the scheduling sleep, before publishing
The publish workflow only checked firstPost.state === 'QUEUE' once, at
workflow start, then slept until the scheduled publishDate - which can be
days or weeks out. Nothing re-validated the post's state after waking up,
so a post reverted to DRAFT, deleted, or otherwise moved out of QUEUE
during that wait still reached the provider once the sleep ended (#2275).

New post.workflow.v1.1.3 (post.workflow.v1.1.2 is already in production
and workflow files can't be edited in place) adds that re-check right
after the sleep, using the same "Already posted" ERROR path the pre-sleep
check already uses. startWorkflow() and the missing-posts sweep's
signalWithStart() both now start postWorkflowV113 for new executions;
already-running postWorkflowV112 executions keep running under their
original code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 16:26:11 +03:00
cc2fecf2a7 fix: don't create a junk org when registering via a valid invite link
routeAuth() always called createOrgAndUser() for a new LOCAL registration
before checking for a pending invite, then only afterwards tried to also
add the user to the inviting org via addUserToOrg(). A user registering
through a valid invite link ended up SUPERADMIN of a brand-new throwaway
organization, with the invited org as a bonus membership rather than the
intended destination (closes #2199).

When a valid invite is present, create the user without an organization
and add them straight to the inviting org. Only fall back to a standalone
org if the invite can no longer be redeemed (already used, or the org hit
its seat limit), so the account never ends up with zero organizations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 16:20:32 +03:00
344662a527 fix(security): allowlist methods callable via third-party function dispatch
/third-party/function/:id/:functionName let any authenticated org member
invoke ANY method found on a third-party provider instance (checkConnection,
sendData, or a future internal helper) just by naming it in the URL - no
allowlist, unlike the analogous video-function dispatch endpoint which
already guards with @ExposeVideoFunction/checkAvailableVideoFunction.

Add the same allowlist shape for third-party providers:
@ExposeThirdPartyFunction + checkAvailableThirdPartyFunction, mark the
handful of methods the frontend actually dispatches this way
(HeyGen generateVoice/voices/avatars, Reel.Farm listMedia), and reject
everything else with a 400 in ThirdPartyController#callFunction.

Added libraries/nestjs-libraries/src/3rdparties/thirdparty.manager.standalone.spec.ts
(RED before the interface export existed, GREEN after); full
*.standalone.spec.ts suite (8 suites/50 tests) still green.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 03:46:17 +03:00
bb2b7fd0fe feat: add best-time-to-post suggestions backed by a bounded daily batch job
Adds the "best time to post" recommendation gap identified against
Buffer/Later, using the bounded design the prior session deliberately
held back instead of unbounded live provider calls per request:

- New PostEngagementSnapshot model: one row per post (upserted in place),
  storing UTC day-of-week/hour-of-day and an engagement score derived from
  the platform's own existing post analytics.
- New daily Temporal workflow (bestTimeToPostWorkflow, modeled on the
  existing missingPostWorkflow infinite-loop pattern) drains up to a hard
  capped number of published posts per run via PostEngagementService,
  reusing PostsService.checkPostAnalytics rather than any new live-call
  path. Expired-token integrations are skipped (not force-refreshed) to
  avoid a background job silently disconnecting a channel; transient
  provider failures are left as candidates for a later run instead of
  permanently excluding a post from its channel's recommendation.
- New read-only GET /analytics/best-time/:integration endpoint aggregates
  only the stored snapshots (plain DB groupBy, no provider calls), scoped
  to the calling org's integration.
- Frontend: a "Suggested Best Times" panel in the per-channel time-slot
  settings modal, with an explicit empty state when there isn't enough
  history yet (no fake data), and an "Add" action that feeds a suggestion
  straight into the existing autopost time-slot mechanism.

Also fixes an unrelated pre-existing implicit-any (TS7018) on the bulk
schedule post-validation payload in posts.service.ts, found while adding
test coverage for the new aggregation math.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 02:41:11 +03:00
0cd822caa1 feat: add CSV bulk scheduling and client-facing post approval
Closes two real feature-parity gaps vs Buffer/Hootsuite/Later found during
a competitive audit (calendar view and per-post/per-platform analytics
already existed in this codebase, so those were not duplicated):

- Bulk CSV scheduling: POST /posts/bulk-schedule schedules many posts from
  a pasted CSV (date,content), reusing the exact validatePosts ->
  mapTypeToPost -> createPost pipeline the single-post endpoint already
  uses, one row at a time, so a bad row never aborts the batch. Scoped to
  the providers that need no extra settings beyond __type (threads,
  mastodon, bluesky, telegram, nostr, vk) via new providerNeedsSettings()/
  simpleTextProviders() helpers derived from the existing allProviders()
  data, not a hardcoded per-provider branch. New "Bulk schedule from CSV"
  button next to Create Post in the launches sidebar; the channel picker
  fetches the supported-provider list from
  GET /posts/bulk-schedule/supported-providers instead of duplicating it.

- Client-facing approval: the public preview link already had a
  comments/review flow (recaptcha + reviewer-name capture) but no way for
  an external client to actually approve a draft. New
  POST /public/posts/:id/approve lets them flip a DRAFT post to QUEUE
  through the same changePostStatus() path the internal "schedule" button
  uses (so the Temporal publish workflow actually starts), and records a
  system comment (new additive Comments.isApproval boolean) so the
  approval shows in the thread. Only works on posts currently in DRAFT.

Schema: additive only (CreationMethod.BULK_CSV, Comments.isApproval
default false), applied via the existing prisma db push flow.

Also adds jest.standalone.config.js + a test:standalone script: this repo
has no working test runner (@nx/jest's getJestProjects() can't discover
anything without an nx.json), so the pure-logic units added here
(provider-capability check, CSV parsing) get a minimal, self-contained
ts-jest config instead of shipping untested.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 02:07:16 +03:00
86475231d1 fix: gate Stripe.js load behind the billing-enabled flag
loadStripe() injects the js.stripe.com script (and its fingerprinting
requests) as soon as it's called, regardless of whether the key is
valid, and FirstBillingComponent called it unconditionally on mount.
It relied entirely on its parent only rendering it when billing is on.
Check billingEnabled/stripeClient directly before loading Stripe so it
never loads when billing is disabled for this deployment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-19 13:42:52 +03:00
9203a696a6 fix: don't crash backend startup when Mastra/Postgres init fails
startMcp() connects Mastra to Postgres on first use; a DB outage or
misconfiguration there rejected start() before app.listen() ever ran,
taking down every route in the backend, not just /mcp and /copilot.
Wrap it in try/catch so a failure is logged and the rest of the
backend still boots.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-19 13:42:43 +03:00
Nevo David
08b1e6b46f Merge remote-tracking branch 'origin/main' 2026-10-15 22:23:33 +03:00
Nevo David
20609d33a0 feat: hubspot integration 2026-10-15 22:23:09 +03:00
Gilad Resisi
021c2ee076
Merge pull request #2266 from gitroomhq/feat/self-host-plus-jakarta-sans
fix(frontend): self-host Plus Jakarta Sans instead of next/font/google
2026-10-15 11:36:47 +00:00
Nevo David
adb8a1a7b2
Merge pull request #2269 from gitroomhq/fix/return-url-same-origin
fix(auth): only follow a returnUrl on this app after signing in
2026-10-15 13:55:39 +03:00
Nevo David
9a88959839 fix(auth): only follow a returnUrl on this app after signing in
ReturnUrlComponent stored ?returnUrl= whenever it contained "http", and
layout.context sent the browser there after login or sign-up. That made the
login an open redirect, and a javascript: value could run script on the
Postiz origin. returnUrl is now kept only when it is an http(s) address on
the app's own origin, checked when it is stored and again when it is read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:49:26 +03:00
Nevo David
ef8c7b8c44 feat(hubspot): explain the HubSpot install on the calendar
The HubSpot app's redirect URL (/oauth/hubspot/callback) dropped people on
the bare calendar, so nothing said the install worked or what to do next.
It now lands on /launches?hubspot=installed, where HubspotInstalled opens a
modal with the next steps in HubSpot (Agent Builder > MCP Servers > Postiz
MCP) and then clears the param. returnUrl brings someone who has to sign in
first back to it. Two new strings in en and the 14 Lingo locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:40:07 +03:00
Nevo David
0956d49ab7 feat: hubspot 2026-10-15 12:53:26 +03:00
Gilad Resisi
ea9c820160 fix(frontend): self-host Plus Jakarta Sans instead of next/font/google
The frontend build fetched Plus Jakarta Sans from Google Fonts at build
time, and a few CI builds failed with "Can't resolve
'@vercel/turbopack-next/internal/font/google/font'". The font is now
loaded with next/font/local from woff2 files in the repo, so the build
no longer depends on Google.

The files are the variable fonts from tokotype/PlusJakartaSans commit
18d1cd2f (the same files google/fonts ships, SIL OFL 1.1, license
included), converted to woff2. All four layouts share one 500-700
upright + italic definition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:35:27 +07:00
Nevo David
d758146320 Merge remote-tracking branch 'origin/main' 2026-10-15 12:14:46 +03:00
Gilad Resisi
a7666b5e2b
Merge pull request #2258 from gitroomhq/fix/youtube-thumbnail-keep-release-url-main
fix(youtube): keep the video id and URL on a post that fails only at the thumbnail step
2026-10-15 07:37:52 +00:00
Gilad Resisi
aff38f99e6 fix(telegram): mark connect command input as read-only
The connect command input had a controlled value without onChange,
which made React log a console error when opening the Telegram
connect modal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:19:38 +07:00
Nevo David
7ca9c39ce6 Merge branch 'main' into feat/hubspot-mcp-oauth 2026-10-15 08:09:24 +03:00
Gilad Resisi
23beddcd09 fix(youtube): keep the video id and URL on a post that fails only at the thumbnail step
The video is already live when thumbnails.set is rejected, but the post
ended in ERROR with no release URL, so users re-uploaded duplicates. The
provider now throws PublishedWithError with the video id and URL; the post
activity persists them through PostsService.updateResolvedRelease (the
existing org-scoped repository write, state untouched) and rethrows
BadBody, so every workflow version still marks the post ERROR while the
calendar can link to the live video.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:40:09 +07:00
Gilad Resisi
6cac1d23f3
Merge pull request #2255 from gitroomhq/fix/posts-valid-crash
fix(frontend): handle a failed /posts/valid response in the post modal
2026-10-15 02:03:16 +00:00
Gilad Resisi
81292402ed fix(frontend): handle a failed /posts/valid response in the post modal 2026-10-15 08:53:55 +07:00
Gilad Resisi
b958c5d591 fix(auth): align invite and showorg cookie lifetimes with the token expiry
The frontend proxy stored the team-invite token (org cookie) and the
selected-org cookie (showorg) for only 15 minutes. An invitee who opened
the invite link but finished signing up later lost the invite, even
though the link itself is valid for 2 days since #1643, and a member who
joined via the link fell back to the default org after 15 minutes.

Complementary to the invite token expiry extension in #1643: the org
cookie now lives 2 days to match the link, and showorg gets the same
365-day lifetime the backend already uses for it.
2026-10-15 08:36:12 +07:00
Nevo David
59a50e8bdf Merge remote-tracking branch 'origin/main' 2026-10-14 23:06:27 +03:00
Nevo David
668c971171 feat: delete tool 2026-10-14 23:03:45 +03:00
Gilad Resisi
8cfe73a5f6
Merge branch 'main' into feat/billing-ai-credits 2026-10-14 16:44:27 +07:00
Gilad Resisi
5a982c60d6 fix(billing): wait for the stored period too before writing the confirmed plan
On a same-plan Monthly/Yearly switch the stored tier already matches
before the webhook, so the first poll wrote a stale snapshot that
reverted the period toggle and could restore cancelAt. showConfirmedPlan
now waits until both the stored tier and period match the change; the
webhook writes tier, period and cancelAt in one update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:34:18 +07:00
Gilad Resisi
f5963e74c8 fix(billing): refresh the card's totals and credits only once the new plan is stored
The in-place plan change only updates Stripe, the stored plan follows
with the webhook, so refetching the credits right away still returned
the old plan's. The billing cycle card now takes its plan from the
stored subscription and, after a plan change, polls /user/subscription
until it matches, then writes the three credit counts and the
subscription into the cache together. Any failure or a webhook slower
than about 10 seconds leaves the previous values in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:24:24 +07:00
Gilad Resisi
7e6b155147 feat(billing): trial-aware renewal sentence, refresh the card after a plan change
getRenewalDate now returns { renewsAt, trialing }: while the Stripe
subscription is trialing, renewsAt is its trial_end and the card says
the free trial ends and the first payment is charged on that date.
After an in-place plan change the renewal date and the credits are
revalidated together with the invoices, so the counters don't mix the
new plan's totals with the old plan's remaining credits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:34:18 +07:00
Gilad Resisi
6b6073a3db
Merge branch 'main' into fix/mention-dropdown-dark-mode 2026-10-14 15:11:58 +07:00
Gilad Resisi
53d796ec8e fix(editor): highlight the keyboard-selected mention row
The global .dropdown-menu button rule sets a transparent background with
higher specificity than a plain Tailwind bg class, so the selected row's
bg-boxHover never showed and keyboard navigation had no visible cursor.
Use the dropdown's own hover color with the important modifier for the
selected row, and drop the hover class that the global rule overrode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:10:47 +07:00
Gilad Resisi
51795629ec feat(billing): show the renewal date and remaining AI credits on the billing page
Adds a Billing cycle card between the plans and the payment method card:
the next renewal date from the payment provider (new getRenewalDate on the
provider interface, null by default, Stripe reads current_period_end of the
live subscription) via GET /billing/renewal, and the remaining AI images,
AI videos and clipping minutes of the current month from the existing
/copilot/credits endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:57:16 +07:00
Gilad Resisi
b664f5f97f
Merge pull request #2241 from gitroomhq/fix/default-org-prefer-subscribed-main
fix(auth): prefer an org with a subscription as the default active org
2026-10-14 06:48:55 +00:00
Gilad Resisi
26c4c3ba68
Merge pull request #2237 from gitroomhq/fix/downgrade-dialog-team-members
fix(billing): warn about team members only when they exist, and say they are disabled
2026-10-14 06:42:12 +00:00
Gilad Resisi
5356052965
Merge pull request #2236 from gitroomhq/fix/delete-account-cancel-and-remove-members
fix(account): cancel the subscription and remove team members on account deletion
2026-10-14 06:41:41 +00:00
Nevo David
6f4156afcb Merge remote-tracking branch 'origin/main' 2026-10-14 08:06:44 +03:00
Nevo David
a36eada0aa feat: cancel 2026-10-14 08:06:34 +03:00
Nevo David
b1a28b17eb feat: hubspot 2026-10-14 08:04:22 +03:00
Gilad Resisi
2775f59ae9 fix(editor): make the mention dropdown readable in dark mode
The @mention suggestion list used hardcoded light colors (bg-white,
text-gray-800, bg-blue-100). In dark mode bg-white resolves to the dark
background while the label stays near-black, so results were invisible
and the list looked empty. Use the theme tokens the other menus use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 18:57:04 +07:00
Gilad Resisi
5f6008bba0 fix(auth): prefer an org with a subscription as the default active org
When no showorg cookie is set (or it no longer matches), the auth
middleware fell back to the first org of an unordered query. Invited
team members who also own an empty personal org could land behind the
paywall instead of in the paid team org they joined. Prefer an org that
has a subscription before falling back to the first one. An explicit
showorg cookie still wins.
2026-10-13 08:52:40 +07:00