Commit Graph

2281 Commits

Author SHA1 Message Date
Paul Fitzpatrick
fe12562ad7 (core) updates from grist-core 2023-08-22 14:34:01 -04:00
Paul Fitzpatrick
f6e8b9c8a7 (core) move ACLFormula test
Summary:
move a test of access control formulas
to grist-core

Test Plan: moving a test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4013
2023-08-22 14:24:51 -04:00
Paul Fitzpatrick
c31999e604 (core) move assistant test
Summary:
Moves assistant test to core.
Fixes new name for constaint.
Works around a chai-as-promised issue.

Test Plan: this

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4010
2023-08-22 08:14:48 -04:00
Janet Vorobyeva
b41fa31dd9
Fixes bug 'this.valueFormatter is not a function' (#632)
https://grist.slack.com/archives/C069RUP71/p1692034396980779
Bug showed up when deleting a page with the right kinds of
widgets/fields, due to a missing isDisposed check

Bug was found in DateTextBox, but I added the fix to NTextBox which
had an identical bit of code
2023-08-22 03:17:01 -04:00
nbush
963b3ea5df
adding env variable anchor links (#637) 2023-08-21 12:20:19 -04:00
github-actions[bot]
c214fd51d2
automated update to translation keys (#636)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2023-08-21 09:20:57 -04:00
Paul Fitzpatrick
b3a71374d1 (core) updates from grist-core 2023-08-21 09:15:53 -04:00
Camille L
69f43f061b
Translated using Weblate (French)
Currently translated at 94.2% (896 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/fr/
2023-08-21 13:54:06 +02:00
Riccardo Polignieri
9b62fd4b68
Translated using Weblate (Italian)
Currently translated at 100.0% (951 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/it/
2023-08-19 22:50:43 +02:00
Paul Fitzpatrick
0be858c19d
allow AI Assistance to run against any chat-completion-style endpoint (#630)
This adds an ASSISTANT_CHAT_COMPLETION_ENDPOINT which can be used
to enable AI Assistance instead of an OpenAI API key. The assistant
then works against compatible endpoints, in the mechanical sense.
Quality of course will depend on the model. I found some tweaks
to the prompt that work well both for Llama-2 and for OpenAI's models,
but I'm not including them here because they would conflict with some
prompt changes that are already in the works.

Co-authored-by: Alex Hall <alex.mojaki@gmail.com>
2023-08-18 16:14:42 -04:00
Alex Hall
166312be3a (core) Add dialog with options to allow downloading without history or data
Summary:
{F74398}

Refactored the 'radio checkboxes' in the modal for deleting a page and reused them here.

The option to download as a template already existed in the server code but wasn't being exercised by the frontend. Also added an option to remove just the history, which is the main motivation for this diff.

Test Plan: Expanded the existing nbrowser test.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3999
2023-08-18 15:38:24 +02:00
Alex Hall
a1d31e41ad (core) Prevent the AI assistant response from including class definitions
Summary:
Sometimes the model repeats the classes given in the prompt which would mess up extracting the actual formula. This diff solves this by:

1. Changes the generated Python schema so that (a) the thing that needs completing is a plain top level function instead of a property/method inside the class and (2) the classes are fully valid syntax, which makes it easier to
2. Remove classes from the parsed Python code when converting the completion to a formula.
3. Tweak the prompt wording to discourage including classes in general, especially because sometimes the model tries to solve the problem by defining extra methods/attributes/classes.

While I was at it, I changed type hints to use builtins (e.g. `list` instead of `List`) to prevent `from typing import List` which was happening sometimes and would look weird in a formula. Similarly I removed `@dataclass` since that also implies an import, and this also fits with the tweaked wording that the classes are fake.

Test Plan:
Added a new test case to the formula dataset which triggers the unwanted behaviour. The factors that seem to trigger the problem are (1) a small schema so the classes are easier to repeat and (2) the need to import modules, which the model wants to place before all other code. The case failed before this diff and succeeded after. The tweaked wording reduces the chances of repeating the classes but didn't eliminate it, so forcibly removing the classes in Python was needed.

There were also a couple of other existing cases where repeating the classes was observed before but not after.

Overall the score increased from 49 to 51 out of 69 (including the new case). At one point the score was 53, but changes in whitespace were enough to make it drop again.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4000
2023-08-18 12:50:09 +02:00
Alex Hall
999d723d14 (core) Cleanup old frontend code for handling empty summary groups
Summary: The removed TODO was resolved in https://phab.getgrist.com/D3489

Test Plan: Existing tests

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4006
2023-08-18 12:46:15 +02:00
Paul Janzen
5705c37d02
Translated using Weblate (Spanish)
Currently translated at 100.0% (951 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-08-17 23:53:06 +02:00
Paul Fitzpatrick
fe846d3068 (core) allow copying errors from regular cell editor
Summary:
There was already some support for copying errors from the detached/expanded formula editor. This adds support for copying errors in the regular cell editor.

Getting error details is now done only by clicking on the expand icon - previously you could click on the error text itself.

A few unrelated test changes are made for exact-pixel checks that were often out by approx 1 pixel on my machine.

Test Plan: Updated tests. Tested copying/pasting manually.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4002
2023-08-17 09:35:22 -04:00
Владимир В
1774d0314f
Translated using Weblate (Russian)
Currently translated at 99.6% (948 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-08-16 21:48:20 +02:00
Jarosław Sadziński
fad421b7c0 (core) Removing temporary pro site
Summary: Creating a pro team site after Stripe checkout. Previously a stub site was always created and never removed, even if a user cancels the checkout process, which resulted in multiple 'ghost' sites that can't be removed.

Test Plan: Updated and added

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3985
2023-08-16 08:11:26 +02:00
Philip Standt
9df62e3d81
Add appearance parameter to override theme preferences (#620) 2023-08-15 10:29:29 -07:00
Paul Fitzpatrick
f1a0b61e15 (core) updates from grist-core 2023-08-15 12:15:16 -04:00
Philip Standt
cbdffdfff8
Support grid selection with Ctrl+Shift+Arrow (#615) 2023-08-14 09:28:41 -07:00
Владимир В
f4d2c866d2
Translated using Weblate (Russian)
Currently translated at 99.5% (947 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-08-14 17:51:37 +02:00
Florent
fde56ffa33
DocApi: Introduce hidden option for GET on records (#623)
Also test that PUT /columns?replaceall=1 does not remove hidden columns
2023-08-14 16:17:46 +02:00
Paul Janzen
166726bc50
Translated using Weblate (German)
Currently translated at 100.0% (951 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/de/
2023-08-12 19:46:31 +02:00
gallegonovato
244b6b91aa
Translated using Weblate (Spanish)
Currently translated at 100.0% (951 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-08-12 19:46:31 +02:00
Paul Janzen
b9564e4151
Translated using Weblate (Spanish)
Currently translated at 100.0% (951 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-08-12 19:46:31 +02:00
Paul Janzen
a3467c35c6
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (951 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pt_BR/
2023-08-12 19:46:31 +02:00
Florent
e93ad5a0c5
Issue #601: implement PUT on columns (#605)
* Also Add includeHidden param for GET on columns
2023-08-11 15:12:43 +02:00
gallegonovato
605a3022e9
Translated using Weblate (Spanish)
Currently translated at 100.0% (951 of 951 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-08-11 09:50:34 +02:00
Paul Janzen
3fcd093ea6
Translated using Weblate (German)
Currently translated at 100.0% (949 of 949 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/de/
2023-08-10 21:52:16 +02:00
gallegonovato
652cc345fd
Translated using Weblate (Spanish)
Currently translated at 100.0% (949 of 949 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-08-10 21:52:16 +02:00
Paul Janzen
3c44489582
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (949 of 949 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pt_BR/
2023-08-10 21:52:16 +02:00
github-actions[bot]
884803592c
automated update to translation keys (#617)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2023-08-09 14:26:56 -04:00
George Gevoian
0f2b1f6a89 (core) Polish "Click to insert $id" tooltip
Summary:
The tooltip also broke recently on Firefox after upgrading Ace. This
includes a fix for the regression.

Test Plan: Updated test.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek, dsagal

Differential Revision: https://phab.getgrist.com/D3982
2023-08-09 07:38:34 -07:00
github-actions[bot]
cefea55198
automated update to translation keys (#613)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2023-08-09 10:02:03 -04:00
Paul Fitzpatrick
bb6926d2a0 (core) updates from grist-core 2023-08-09 09:58:42 -04:00
jasongwq
ccf00fc05b
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (936 of 936 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/zh_Hans/
2023-08-09 15:49:28 +02:00
Владимир В
01a9b5fa05
Translated using Weblate (Russian)
Currently translated at 99.6% (933 of 936 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-08-09 15:49:28 +02:00
demonisius
52c20228e3
Translated using Weblate (Russian)
Currently translated at 99.6% (933 of 936 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-08-09 15:49:28 +02:00
Paul Janzen
88b447a1a3
Translated using Weblate (German)
Currently translated at 100.0% (936 of 936 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/de/
2023-08-09 15:49:28 +02:00
gallegonovato
b0cf1f49dd
Translated using Weblate (Spanish)
Currently translated at 100.0% (936 of 936 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-08-09 15:49:28 +02:00
Paul Janzen
e46e3961c5
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (936 of 936 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pt_BR/
2023-08-09 15:49:28 +02:00
Camille L
26084205d5
Translated using Weblate (French)
Currently translated at 95.5% (894 of 936 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/fr/
2023-08-09 15:49:28 +02:00
Paul Fitzpatrick
d6ab1f45c2 (core) move LinkingError and RawData tests
Summary:
Moves some more relevant tests to grist-core.
Small change to declarations that seemed necessary when
running buildtools/build_core.sh now, but I'm not sure
what changed. CI hasn't flagged anything, so smells like
the version of some package not nailed down.

Test Plan:
tried running tests in new location using
buildtools/build_core.sh

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3996
2023-08-09 09:46:36 -04:00
Jarosław Sadziński
732611c356 (core) Removing GRIST_FORMULA_ASSISTANT flag
Summary:
A floating formula editor is available by default and in the basic setup allows just formula modification.
AI assistant is now an optional component of the floating editor and it is controlled by OPENAPI_KEY presence.
Env variable GRIST_FORMULA_ASSISTANT was removed, new feature flag HAS_FORMULA_ASSISTANT is derived from the presence of OPENAPI_KEY.

Also updated anonymous signup nudge. By default it displays only info that this feature is only for logged in users.

Test Plan: updated

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3987
2023-08-09 10:08:18 +02:00
George Gevoian
24bbf375f9 (core) Add earliestDocCreatedAt to telemetry
Summary: This tracks the earliest document creation time, if any, for each site.

Test Plan: Server tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3991
2023-08-08 00:48:18 -07:00
Dmitry S
efb5fc63d7 (core) Change the label/nickname of the paid plan to Pro
Summary:
This is to match the pricing page, and to reduce confusion. The same
change was made to the description of the corresponding "pricing" object
on Stripe. The Stripe value is what's used in practice; this value is
actually only used as a fallback.

Test Plan: The code change does not affect tests, but several tests fixed after grist-core merge.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3990
2023-08-07 23:45:18 -04:00
Dmitry
c9489e4a61
Fix ManyFetches test, and include into grist-core a needed upgrade to the 'ws' package. (#614)
This is a follow-up fix to 526a5df157.
2023-08-07 18:39:14 -04:00
Paul Fitzpatrick
031076cd07 (core) updates from grist-core 2023-08-07 14:29:30 -04:00
CamilleLegeron
02841bd15c
Header colored (#581) 2023-08-07 11:01:35 -07:00
Dmitry S
526a5df157 (core) Manage memory used for websocket responses to reduce the risk of server crashes.
Summary:
- Implements MemoryPool for waiting on memory reservations.
- Uses MemoryPool to control memory used for stringifying JSON responses in Client.ts
- Limits total size of _missedMessages that may be queued for a particular client.
- Upgrades ws library, which may reduce memory usage, and allows pausing the websocket for testing.
  - The upgrade changed subtle behavior corners, requiring various fixes to code and tests.

- dos.ts:
  - Includes Paul's fixes and updates to the dos.ts script for manual stress-testing.
  - Logging tweaks, to avoid excessive dumps on uncaughtError, and include timestamps.

Test Plan:
- Includes a test that measures heap size, and fails without memory management.
- Includes a unittest for MemoryPool
- Some cleanup and additions to TestServer helper; in particular adds makeUserApi() helper used in multiple tests.
- Some fixes related to ws upgrade.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3974
2023-08-07 11:28:31 -04:00