Skip to content

030 react live queries#260

Merged
jamals86 merged 6 commits into
mainfrom
030-react-live-queries
May 10, 2026
Merged

030 react live queries#260
jamals86 merged 6 commits into
mainfrom
030-react-live-queries

Conversation

@jamals86
Copy link
Copy Markdown
Member

This pull request introduces several updates across the codebase, focusing on dependency upgrades, improved security and authorization for file downloads, documentation enhancements, and project governance formalization. The most significant changes are grouped as follows:

1. Security and Authorization Improvements for File Downloads

  • Refined file download authorization logic in download_file to ensure only users with appropriate roles (DBA/System) can download files for other users, and regular users can only download their own files. Introduced the can_download_user_file_for_target helper for clear, testable permission checks. Also improved input sanitization and error handling for file paths and download requests. [1] [2] [3] [4] [5] [6] [7]
  • Updated the file download endpoint route and documentation to use stored_name instead of file_id for clarity and consistency. [1] [2]

2. Dependency and Version Upgrades

  • Upgraded several Rust dependencies to their latest patch versions, including tonic, tonic-prost, bcrypt, wasm-bindgen, wasm-bindgen-futures, js-sys, and web-sys. Updated the workspace version to 0.5.0-beta.1 and set the minimum Rust version to 1.92. [1] [2] [3]

3. Documentation and Licensing

  • Added explicit Apache 2.0 license notices to the main README.md and backend README.md, referencing the appropriate files. [1] [2]
  • Updated .github/agents/copilot-instructions.md to reflect new active technologies (TypeScript 6, React 19, Node.js 18, and related tools) and recent changes, including the new React live queries feature plan. [1] [2] [3]
  • Added a build step for the React SDK in the release workflow to ensure React SDK packages are built during CI/CD.

4. Project Governance and Principles

  • Replaced the placeholder constitution with a detailed, KalamDB-specific constitution outlining core principles (performance, boundary ownership, minimal dependencies, validation/testing/doc, composable APIs), architecture/delivery constraints, workflow/quality gates, and governance.

These changes collectively improve security, maintainability, clarity, and governance for the project.

jamals86 added 6 commits May 7, 2026 22:34
Introduce React live-query support and related tooling (030-react-live-queries): add @kalamdb/react package, React examples (examples/react-ai-chat), new TypeScript/React SDK tests and specs, and docs showing React usage. Rename client subscription APIs across CLI and tests from subscribe/subscribe_with_config to live_events/live_events_with_config and update call sites accordingly. Update project docs and READMEs (license clarified to Apache-2.0), add a KalamDB speckit constitution, and relax backend server allowed_origins to '*' for dev setups. Miscellaneous updates: docs/sdk React examples, TypeScript SDK additions, and numerous test adjustments to align with the new live-query APIs.
Add a release workflow step to build the React SDK from link/sdks/typescript/react-old. Include a new package-lock.json for the examples/react-ai-chat app and update related example files (package.json, scripts, vite config). Also reflect React SDK renames/moves (react -> react-old) across SDK docs/examples and update UI package/config files and react live-queries spec files.
Introduce multiple topic and file-download improvements:

- Add POST /v1/api/topics/latest-offsets endpoint to resolve partition head offsets (service/dba/system only).
- Make topic consume support optional consumer group (stateless inspection); honor requested position for stateless reads and route fetches accordingly.
- Add RESET CONSUMER GROUP SQL command/parser/classifier, integrate into extensions and dialect, and implement handler + result rows so admins (dba/system) can move group cursors. Wire into stream handler registry.
- Harden file download handler: rename path param to stored_name, validate/guess content type from stored_name, sanitize disposition, and restrict cross-user raw file downloads to dba/system via explicit authorization helper. Update DownloadQuery docs and tests.
- Improve health/job maintenance: add lower-frequency idle trim guard, epoch helper, and avoid unnecessary leadership polling in single-node mode; increase idle poll max and reduce unnecessary ticks.
- Minor cleanups and tests: small formatting fixes in backup/restore tests, add topic models (selectors/response), and update routes, models, and related tests and SDK/UI files.

These changes add admin tooling for topic maintenance, tighten file download security/authorization, and reduce background wakeups in non-cluster deployments.
Replace the monolithic SDK workflow with dedicated TypeScript and Dart SDK workflows (.github/workflows/typescript-sdk.yml, .github/workflows/dart-sdk.yml) and remove the old sdks.yml and orm.yml. Add a versions management script and manifest (scripts/versions.py, versions.json) and wire it into the release flow: release.yml now syncs versions.json, reads version metadata via the script, and uses the synced commit for release assets. Also enable workflow_call publish inputs (python-sdk.yml) and update release tasks to include versions.json in release artifacts and target the synced commit when creating releases. These changes split responsibilities per-SDK, add badge/update steps and centralize version resolution.
@jamals86 jamals86 merged commit 174514c into main May 10, 2026
15 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