Commit Graph

5427 Commits

Author SHA1 Message Date
Chirag Aggarwal 17bae22b24 Revert "Merge pull request #12356 from appwrite/fix-account-server-specs-auth"
This reverts commit ff76f3efa0, reversing
changes made to ed14acfc75.
2026-05-26 10:51:52 +05:30
Damodar Lohani ce31a4f336 feat!: rename User::ROLE_APPS to ROLE_KEYS and isApp() to isKey() 2026-05-24 02:20:47 +00:00
harsh mahajan 6a4dcd76a7 Keep organization projects schema unchanged 2026-05-22 15:45:32 +05:30
harsh mahajan e831b3e952 Add project status index 2026-05-22 15:39:16 +05:30
harsh mahajan 4dec4f2ff2 Fix organization project API headers and queries 2026-05-22 15:32:44 +05:30
Harsh Mahajan 4eb956b820 Merge branch '1.9.x' into feat-ser-401-custom-triggers 2026-05-21 16:37:24 +05:30
Chirag Aggarwal 0d19894331 Move Web SDK to server platform 2026-05-20 14:09:07 +05:30
harsh mahajan 3b3a04877f feat: remove CommitSkipPatterns - already available in 1.9.x
Keep only branch and path skip trigger logic. Commit message skip
is handled by the existing Contains(VCS_DEPLOYMENT_SKIP_PATTERNS) check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 11:21:04 +05:30
harsh mahajan a4a57bc64d Merge branch '1.9.x' into feat-ser-401-custom-triggers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 11:20:08 +05:30
ArnabChatterjee20k ffe06180bc Merge remote-tracking branch 'origin/1.9.x' into presence-api 2026-05-18 21:49:37 +05:30
ArnabChatterjee20k 6f28f2e4f7 linting 2026-05-18 21:26:21 +05:30
ArnabChatterjee20k 42144ab9a0 added category to the presences scopes 2026-05-18 21:23:21 +05:30
Atharva Deosthale 4f676aac15 Merge pull request #12337 from appwrite/feat/sites-bun-deno-runtimes
feat(sites): allow bun and deno as build runtimes for JS frameworks
2026-05-18 16:12:18 +05:30
Atharva Deosthale 03e62dde94 feat(sites): allow bun and deno as build runtimes for JS frameworks
Merge BUN and DENO template runtimes into the runtimes list for every NODE-based Sites framework (analog, angular, nextjs, react, nuxt, vue, sveltekit, astro, tanstack-start, remix, lynx, react-native, vite, other). The Console's build-runtime dropdown reads framework.runtimes, so this is what surfaces bun-1.3 and deno-2.6 in the UI now that openruntimes/open-runtimes#485 has shipped SSR support for both runtimes.

The server-side WhiteList validator on POST /v1/sites already accepts any runtime in the global runtimes config, so CLI and REST clients have been able to pick bun/deno all along; this change only flips the UI gate.

Flutter stays flutter-only.
2026-05-18 15:16:59 +05:30
ArnabChatterjee20k 14381f2268 Merge branch '1.9.x' into presence-api 2026-05-15 15:53:51 +05:30
Matej Bačo 75587e629e Improve quality of org scopes 2026-05-15 10:23:22 +02:00
ArnabChatterjee20k 5123956790 reverted schema 2026-05-14 11:57:23 +05:30
ArnabChatterjee20k 995f844254 feat: refine permissions parameter handling in Presence action for clarity and consistency 2026-05-13 19:19:00 +05:30
ArnabChatterjee20k f09aec7651 feat: update presence handling and refactor related attributes for consistency 2026-05-13 18:52:14 +05:30
ArnabChatterjee20k 4e2bd9c307 feat: add presence already exists error handling and update exception messages 2026-05-13 12:30:54 +05:30
ArnabChatterjee20k 7f6482a7d2 Merge remote-tracking branch 'origin/1.9.x' into presence-api 2026-05-13 11:12:23 +05:30
Jake Barnby b058eb31f4 (refactor): inline CTAs as JSON on insights collection 2026-05-13 17:10:33 +12:00
Jake Barnby f4133609db (fix): remove invalid index prefix lengths exceeding column size
The prefix length 700 exceeded the resourceId/parentResourceId column
size of 255 (Database::LENGTH_KEY), crashing the container at startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 02:05:55 +12:00
Jake Barnby 304b0dab35 (fix): address greptile P1 review comments
- Add skipFilters to Reports/Get.php (was the only endpoint still
  triggering the full N+1 subquery cascade)
- Scale CTA batch limit dynamically (insightCount * MAX_CTA_COUNT)
  instead of fixed APP_LIMIT_SUBQUERY to prevent silent truncation
- Revert deleteReport to callback-based pagination so CTAs are not
  orphaned when a report has more than APP_LIMIT_SUBQUERY insights
- Add explicit prefix lengths (700) to _key_project_resource and
  _key_project_parent_resource indexes to stay under InnoDB 3072-byte limit
- Validate CTA service/method against ADVISOR_CTA_SERVICES and
  ADVISOR_CTA_METHODS enums in the CTAs validator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 01:42:59 +12:00
Jake Barnby 9da4a3260d (refactor): improve advisor module perf, security, and maintainability
- Fix N+1 in Reports/XList (51→4 queries) via skipFilters + batch fetch
- Add skipFilters to Reports/Delete and cursor fetch (avoid loading all
  nested insights/CTAs just for ownership check)
- Fix N+1 in deleteReport worker (flat CTA deletion instead of per-insight)
- Add advisor entity cleanup on project deletion (reports, insights, CTAs)
- Remove resourceInternalId, parentResourceInternalId, $permissions from
  Insight response model (internal IDs leak DB internals, permissions unused)
- Remove dead subQueryInsightCTAs filter registration
- Remove stale enum-value comments from platform schema
- Fix _key_dismissedAt index to include projectInternalId
- Fix scope category from 'Other' to 'Advisor'
- Switch action base class from Utopia\Platform\Action to Appwrite\Platform\Action

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 01:13:37 +12:00
Jake Barnby f9ff1166b9 (perf): batch-fetch CTAs across an insight set to collapse N+1 2026-05-12 23:24:26 +12:00
Jake Barnby 4cd35e4d93 Merge branch '1.9.x' into feat-insights-module 2026-05-12 22:59:34 +12:00
ArnabChatterjee20k 95dd44115d refactor: update Dockerfile to remove composer stage and adjust presence handling in tests 2026-05-12 15:49:59 +05:30
Atharva Deosthale 668b61e620 Merge pull request #12279 from appwrite/fix-codex-plugin
fix codex plugin
2026-05-12 12:29:06 +05:30
Jake Barnby 51c65093b8 (feat): add appId and appInternalId to reports collection for third-party app submissions 2026-05-12 16:09:38 +12:00
Prem Palanisamy 3721e6b950 fix(migrations): write _APP_MIGRATION_HOST in generated .env (install & upgrade)
The migrations worker (Appwrite→Appwrite migrations + CSV/JSON imports
& exports) reads `_APP_MIGRATION_HOST` to call back into this instance's
API. `_APP_MIGRATION_HOST` was introduced in #11229 (1.8.x / 1.9.x) but
was never added to `app/config/variables.php`, so `appwrite install` /
`appwrite upgrade` never write it into the generated `.env`. With the
var unset, the migrations worker fails — on a fresh self-hosted install
the first export hangs with no error (#11853). (Contributors and CI
don't hit it because the repo's hand-maintained `.env` already has
`_APP_MIGRATION_HOST=appwrite`; only the *installer-generated* `.env` is
missing it.)

Add `_APP_MIGRATION_HOST` to `app/config/variables.php` with default
`appwrite` — the API service name in the standard Docker Compose setup,
which is what the repo's own `.env` and the cloud Helm charts already
use, and what the migration endpoint was hardcoded to before #11229.
`appwrite install` and `appwrite upgrade` now write it into the
generated `.env`, so fresh installs and upgrades have it set and the
migration/import/export flows work.

Scope: this PR fixes the install & upgrade paths only — it deliberately
doesn't change the worker code.

Fixes #11853
2026-05-11 21:26:26 +01:00
Atharva Deosthale 9056de0103 fix codex plugin 2026-05-11 19:38:06 +05:30
Jake Barnby c18865423e Merge remote-tracking branch 'origin/1.9.x' into feat-insights-module
# Conflicts:
#	composer.lock
#	src/Appwrite/Platform/Workers/Migrations.php
2026-05-12 00:23:17 +12:00
Jake Barnby 53d18a0d08 refactor(advisor): rename module to Advisor (service-named, top-level)
The module's namespace and directory now match the top-level service
name (`advisor`) instead of one of its resource names (`insights`):

- src/Appwrite/Platform/Modules/Insights -> .../Modules/Advisor
- src/Appwrite/Insights -> src/Appwrite/Advisor
- tests/unit/Insights -> tests/unit/Advisor
- Route group label flipped from `'insights'` to `'advisor'`
- Section-header comments aligned

Resource names (`insights`, `reports`, `insightCTAs`) and the
`Insight*`/`Report` response models stay — those are the resources the
service exposes, not the service itself.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 23:40:06 +12:00
copilot-swe-agent[bot] 49bf1198b2 refactor(advisor): polish constants aliases and insight lookup helper
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/517a4586-d3e8-40b3-a3a9-f2d2ca82b0a0

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-11 02:08:29 +00:00
copilot-swe-agent[bot] 9186ce3f24 chore(advisor): document null index prefix lengths in reports index
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/517a4586-d3e8-40b3-a3a9-f2d2ca82b0a0

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-11 02:05:20 +00:00
copilot-swe-agent[bot] bfd6cebbb0 fix(advisor): address review comments on tests, naming, docs, and get insight
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/517a4586-d3e8-40b3-a3a9-f2d2ca82b0a0

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-11 01:59:31 +00:00
Jake Barnby 8fa9ead279 chore: merge 1.9.x into feat-insights-module
Resolves conflict in app/init/constants.php (kept 4327 cache buster, took 1.9.4 stable version).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 17:59:01 +12:00
Jake Barnby 83c0a32494 fix(advisor): make reports.target a TEXT column
target stores free-form URLs or resource IDs. URLs in the wild can
exceed the prior 2048-char cap, so switch the column to VAR_TEXT
(65535). The _key_project_target index already declares an explicit
700-char prefix length, so indexing still works on both MariaDB and
MongoDB.

Bump APP_CACHE_BUSTER for the schema change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 12:42:29 +12:00
Jake Barnby b830c08257 fix(advisor): use VAR_TEXT for free-form fields
Switch markdown summaries, JSON CTA params, and the embedded
insights/ctas subQuery payloads from sized VAR_STRING to VAR_TEXT.
None of these fields are indexed and they all hold free-form data, so
removing the artificial size cap means we never have to revisit the
limit when an analyzer surfaces a longer report.

- reports.summary, insights.summary: markdown, no upper bound enforced
- reports.insights, insights.ctas: subQuery virtuals carrying full
  child rows
- insightCTAs.params: JSON parameter blob for arbitrary CTA actions

Bump APP_CACHE_BUSTER for the schema change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 12:30:45 +12:00
Jake Barnby b747c97561 fix(advisor): address review comments on scopes and schema
- Register dedicated reports.write scope and switch deleteReport to it
  so cloud can issue narrowly-scoped delete keys without granting
  insights.write.
- Make insights.parentResourceInternalId optional with null default to
  match its companion parentResourceType/parentResourceId fields and
  unblock insights with no parent (e.g. database-level performance
  insights).
- Tighten Insight.reportId model description: insights always belong to
  a report, ad-hoc insights are not supported.
- Add reports.write to default test API key and admin role so existing
  e2e tests using serverHeaders() can hit the delete endpoint.
- Bump APP_CACHE_BUSTER for the schema change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 12:18:39 +12:00
copilot-swe-agent[bot] 6b64eb85b3 fix(advisor): require null-default VAR_ID schema fields
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/38cebef5-ed45-4283-9097-d48dd0fafb06

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-09 00:00:28 +00:00
Jake Barnby 83cf47e3fd fix(advisor): correct index lengths to fit MongoDB 1024 limit
The reports `_key_project_target` index was failing to create on MongoDB
because target's full size (2048) plus targetType (64) exceeded the 1024
character maximum. Set explicit lengths to truncate target to 700 chars
(total 765, under both Mongo 1024 and MariaDB 768 limits).

Also drop redundant explicit lengths from VAR_ID positions in the
insights and insightCTAs indexes — the validator rejects explicit
lengths on VAR_ID attributes, and they default to length 1 anyway.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 01:29:01 +12:00
Aditya Oberai 8df7a628c8 Merge branch '1.9.x' into add-codex-plugin 2026-05-08 09:34:43 +00:00
copilot-swe-agent[bot] 56b9de097f fix(advisor): restore report delete with async nested cleanup
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/6496395d-5cbf-42ba-a3e0-d3c9e6ca901c

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-08 06:54:49 +00:00
copilot-swe-agent[bot] a9902c33df chore(advisor): clarify insights.write scope usage
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/8d7897b5-ac68-487d-954a-be717380bf66

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-08 06:08:17 +00:00
copilot-swe-agent[bot] 6d0eab2583 refactor(advisor): make insights API read-only in CE
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/8d7897b5-ac68-487d-954a-be717380bf66

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-08 06:07:23 +00:00
copilot-swe-agent[bot] 0829b26508 refactor(insights): remove redundant payload field
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/a680e208-34b8-4bae-a7fd-51949112233a

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-08 05:44:20 +00:00
ArnabChatterjee20k f526fc8577 roles updated 2026-05-08 11:14:00 +05:30
ArnabChatterjee20k a1811570b3 fix: update presence permissions from read to write in roles and HTTP handlers 2026-05-08 10:49:38 +05:30