* fix: refresh $updatedAt after inline row edits
Inline spreadsheet edits called updateRow but kept the pre-write row in
local state, so $updatedAt never changed until a full reload. Apply the
API response system fields before updating the grid (console#2873).
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
* chore: retrigger CI
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
* chore: nudge CI for stuck Tests queue
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
* fix: normalize smart quotes in function execution body
Safari substitutes curly quotes while typing, which makes JSON bodies
invalid (console#2872). Normalize typographic quotes on submit and
disable spellcheck on the body textarea.
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
* fix: only repair smart quotes when they invalidate JSON
Address Greptile P1: unconditional normalization could rewrite intentional
typographic quotes in valid JSON string values or plain-text bodies.
Only normalize when the original body fails JSON.parse and the repaired
body succeeds.
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
* fix: repair only curly double quotes in JSON bodies
Narrow Greptile follow-up: JSON delimiters are double quotes, so leave
apostrophes/single smart quotes untouched. Still only rewrite when the
original body is invalid JSON and the repaired body parses.
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
Datetime inputs are displayed as timezone-less local ISO strings. Without
converting back to UTC on submit, unchanged datetime fields drift by the
browser offset on every update (console#2870). Mirror the filters path and
canonicalize datetime scalars/arrays in buildPayload.
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
`executions` is the umbrella metric covering both functions and sites,
but the table it feeds is headed "Function" and links each row to
/functions/function-{resourceId}. A project with a trafficked site would
get rows showing a raw site ID, unresolvable by functions.list, linking
to a function that does not exist. `functions.executions` is the metric
that matches the table.
Fold the call into the load function's existing Promise.all so it no
longer serialises behind the invoice and usage requests, and report a
failure through trackError instead of swallowing it — a 403 or a
malformed response was previously indistinguishable from a project with
no executions.
Drop the duplicate database-type read in the collection layout, which
recomputed locally what the component already derives.
Matches the project settings cards, which disable their controls on
!$canWriteProjects rather than letting a read-only member submit a
request the API rejects.
Also fills in labels, installationScopes, and installationRedirectUrl on
the App literal built from a CIMD document. Those three became required
on Models.App in SDK 16 and a CIMD document carries none of them, so
they take the same empty defaults as the other fields the document
does not provide.
Lets a project choose which factors can complete an MFA challenge,
including the new custom factor, where Appwrite generates and verifies
the code and the app delivers it over a channel of its own.
The card stays hidden when listPolicies() omits mfa-factors, so a
self-hosted server older than 1.9.6 does not render a control whose
PATCH would 404.
The 1.9.6 console spec adds the mfa-factors project policy, which the
pinned 15.3.0 build predates.
The major bump also removes the Health service (registered in the SDK
store but never called), renames Models.CloudLocale to Models.Locale,
moves createTextEmbeddings from VectorsDB to a new Embeddings service,
drops UsageProject.executionsBreakdown in favour of the dimensional
usage API, and splits the composite `databaseId:collectionId` migration
resourceId into resourceId plus parentResourceId.
Models.Database.type is now the SDK's DatabaseType enum, which also
covers the dedicated backings (mysql, postgresql, mongodb) this console
has no UI for. The local union is extracted from the SDK enum so a
renamed or dropped value breaks the switches instead of drifting
silently, and toDatabaseType() narrows at the boundary — matching the
entity dispatchers, which already throw on an unknown type.
The avatar used object-fit: cover, which crops a wide wordmark into an
unreadable fragment. Switching to contain fixes that for every client, so
the appwrite-cli special case and its resolver helper are unnecessary.
Hardcoding the CLI's client ID in the console was also the wrong layer:
logoUri is server-owned app-registry data, so a square mark belongs in the
registration upstream. Worse, app IDs are user-supplied, so anyone able to
create an OAuth app on a self-hosted instance could claim `appwrite-cli`
and render official Appwrite branding on a consent screen.
The helper's trim/?? '' normalization was dead too: the {#if} already
covered empty and undefined, and cimdDocumentToApp gates logoUri through
HTTP_URL before it ever reaches the template.
Fold the rule into .avatar rather than a separate img.avatar block. Every
other .avatar is a flex-centered div, so object-fit is inert there and the
padding stays harmless.
After invalidate, the store holds the new phoneVerification value.
Match the email path so the toast reports verified/unverified correctly.
Fixes#1392
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
The cloud values moved out of appwrite-labs/cloud-applications into the
consolidated appwrite-labs/application-configuration repository, which is
laid out as <project>/<env>/<app> instead of <env>/<app>.
The values path was hardcoded; it now builds from PROJECT/ENVIRONMENT/
APPLICATION like the other deploy workflows. The tag still lands on the
`cloud-console` alias inside the cloud release, and production still
opens a reviewed PR rather than pushing to main.
The first-party appwrite-cli client registers a wide wordmark as logoUri.
Consent/outcome avatars use a square crop, so object-fit:cover left an
unreadable fragment that looked like a missing logo (#3159). Prefer the
square mark for that client and contain-fit other logos in the avatar.
Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
The three create-site pages conflicted only in their import blocks: main
dropped the FrameworkAdapterWithStartCommand import along with the adapter
start-command reads, while this branch added validateVariables next to it.
Kept both sides' intent — the type is gone from $lib/stores/sites and no
longer referenced, so only the validateVariables import remains.
/console/card and /console/card/<uid> served the 2023 Cloud public beta
shareable card. The API no longer serves /cards/cloud, so both loaders
already bounced to / — the pages were unreachable.
getCampaignImageUrl was the only live export under the route and has
nothing to do with the card, so it moves to $lib/helpers/campaign.ts
next to its one consumer, the unauthenticated layout. getCardImgUrls
went with the route; the [uid] loader kept its own copy. windowFocus.ts
had no consumer besides Card.svelte, and the console layout's /card
path check guarded a route that never rendered under that group.
bun audit fails on GHSA-2v37-7h3g-55p8: the lockfile pinned nanoid 3.3.17
under postcss and @ai-sdk/provider-utils, and neither `bun update nanoid`
nor updating those parents re-resolved it. Bun ignores npm's nested
override syntax, so the override has to be flat.
That takes the direct dependency to the 3.x line as well. The only use is
nanoid/non-secure, which 3.x provides, and the declared range now matches
what installs rather than claiming a 5.x that the override replaces.
The effect is skipped whenever the URL supplied any command, so a deploy
link carrying ?start= kept that entrypoint through a framework switch.
Resetting inside the effect could not fix it either: the effect also runs
on load, where the URL value has to survive.
Move the reset onto the select, so only a user changing framework clears
it and the link keeps working as written.
The settings form already resets it; the create flows kept the previous
framework's entrypoint in state and submitted it, and kept sending it
after a switch to a framework that only builds static.
Reset it alongside the other adapter-derived fields in both places.
The field stays where it is. What goes is the code reading startCommand
off a framework adapter: the SDK never declared it and the API no longer
sends it, so the prefill and the placeholder were pointing at nothing, and
Reset restored a value that does not exist.
Also stop carrying a start command across a framework or adapter change -
it names an entrypoint only the previous framework has - and send it only
for the ssr adapter, matching the fallbackFile line beside it.
An entry with an empty value is discarded rather than written, so an
invalid key on one of them was rejecting the whole file and taking the
valid variables down with it.
A start command names an entrypoint belonging to one framework. Carrying it
across a switch submits it against a runtime that has no such entrypoint,
and a switch to static leaves a command the form no longer shows.
Reset it alongside the other framework-derived fields, and send it only for
the ssr adapter, matching the fallbackFile line beside it.
The create-site flows read startCommand off a framework adapter and
offered it as a prefilled value and a placeholder. The API never returns
that field - FrameworkAdapter does not declare it - so the reads always
resolved to undefined, and the cast that made them typecheck was the only
thing hiding it. Had the field ever been returned, the console would have
put an internal runtime command in front of every user creating a site.
Drop the field from the create flows entirely and let the server pick its
own default. In site settings the input stays, but it moves under a
collapsed Advanced section, loses the Reset-to-default button that had
nothing to reset to, and takes a generic placeholder.
A rejected update left its key in vars, so the second pass picked it up
as a new variable and resent the stored key — the exact call the sparse
update is meant to avoid for keys that predate the identifier rule.
The API now rejects variable keys that are not valid environment variable
names, but the console had no key validation anywhere — only a value
length check. Keys with hyphens, dots, spaces or a leading digit reached
the API and came back as a bare server error, and three flows handled
that badly:
- create-function and create-site create the resource (and its proxy
rule) before the variables, so a rejected key left a function or site
with no deployment behind
- the update modal resends the stored key on a value-only edit, so a key
stored before the rule existed could no longer have its value changed
- promote-to-global deletes the existing global variable before creating
its replacement, so a rejected key destroyed the original
Add a shared validator and check keys before submitting, in every entry
point that writes them. Send the key on update only when it changed, so
the API keeps the stored one and existing keys stay editable. Flag keys
that cannot be used as environment variable names in the variables
tables, since those are ignored at build and runtime. Report per-key
failures from the batch writes instead of a single rejection.
Server-side rule: appwrite/appwrite#13181
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bun audit fails the CI build on three high nanoid advisories. All fixes are
within the existing semver ranges: the direct dependency and @melt-ui/svelte's
nested copy move to 5.1.16, and the 3.x copies under @ai-sdk/provider-utils
and postcss move to 3.3.17.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Appwrite's apps.get()/apps.list() no longer resolve CIMD URLs — appId is
always a plain ID now. Detect URL-shaped OAuth2 client IDs in the console
and fetch the Client ID Metadata Document directly from the browser,
mapping its RFC 7591 fields onto Models.App for consent/device/applications
rendering. Fetch or validation failures fall back to hostname-only branding
so the flow never blocks.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GHSA-5p4m-2wfm-xmqj (CVE-2026-59870) covers >=4.0.0 <4.3.1 and the fix was
not backported, so the existing >=4.3.0 override stopped clearing it and the
audit step in tests.yml now fails on every branch. It reaches us transitively
via eslint > @eslint/eslintrc > js-yaml.
Only the pinned floor and the resolved version move; integrity hashes are
untouched.
The string fallback in the row column renderer exists for the spreadsheet
inline cell editor, where an entire array is edited as one comma-separated
textarea. It keyed off `column.array` (the column definition) rather than
the `array` prop (the render mode).
In the full row create/edit form, columnItem renders one Column per array
element and deliberately omits the `array` prop so each item gets its
element-type input. Since `column.array` was still true, every item
collapsed to a string input -- a Boolean[] column showed "Enter string".
This also caused intermittent save failures: the string component still ran
parseValue() against column.type, so literal true/false/1/0 coerced and
saved, while anything else yielded null, and a null inside a typed array is
rejected by the API.
Keying off the `array` prop restores per-item typed inputs (boolean select,
number input with min/max, date picker) while leaving the spreadsheet cell
editor and its "Advanced edit" link untouched, since only the two
fromSpreadsheet branches pass `array`.
Two of the three added comments restated the expression next to them. Keep
only the one carrying the upstream fact — that the API serializes a missing
seat `limit` as `0` — and leave the rest of the reasoning in the commit
message and PR body.
`getServiceLimit('members')` returned `plan.addons.seats.limit ?? 1`. The
Appwrite starter plan's seats addon omits `limit`, and the API serializes
the missing value as `0` — which is not nullish, so the `?? 1` fallback
never applied and the limit came back as `0`.
`checkForUsageLimit` then read that as "no members allowed":
membersOverflow = Math.max(0, organization.total - 0) // always >= 1
so every free-plan organization was flipped to read-only, which silently
disables project creation, member invites and the other write actions
gated on `readOnly`. The explanatory banner never showed either, because
`limitReached.svelte` is gated on `!billingPlanDetails.usage` and the
starter plan's `usage` serializes to a truthy object — leaving a
greyed-out "Create project" button with no reason given.
Normalise a zero limit to `Infinity` in `getServiceLimit` so every caller
agrees, and only treat a real, positive cap as exceedable so a bad limit
can't take an organization read-only again. The UI call sites already
worked around this with `getServiceLimit('members', ...) || Infinity`;
`checkForUsageLimit` was the only consumer that did not.
Plans that set an explicit seat limit (the Imagine plans use 1) are
unaffected, as are Pro, Scale and Education, which declare no seats addon
and already returned `Infinity`.
The card had no permission check, so a reader saw a delete control that
only failed once confirmed. The rest of the feature already derives that
from messages.write: the list gates its create button and row selection
on it.
Gate the card the same way, so it tracks permission rather than status.
GHSA-rgw5-rvv9-x895 widened the affected range to <5.0.9, so the
existing >=5.0.8 override stopped clearing it and the audit step in
tests.yml now fails on every branch. Only the pinned floor and the
resolved version move; integrity hashes are untouched.