Commit Graph

190 Commits

Author SHA1 Message Date
dab246 eeaab49e93 TF-4268 Cache Sentry config and user for FCM background re-initialization
Signed-off-by: dab246 <tdvu@linagora.com>
2026-04-10 16:05:02 +07:00
dab246 c9ec1c2820 TF-4268 Improve SentryConfig and SentryManager: sampling, frames tracking, non-blocking capture 2026-04-09 14:16:41 +07:00
dab246 5e1d99125e TF-4265 Exclude our signature by add removeTMailSignature option to extractPlainText method 2026-04-07 13:20:25 +07:00
dab246 28d5036667 TF-4378 Migrate scribe-mobile branch to master branch 2026-03-25 11:52:35 +07:00
Théo Poizat 1e43ac510b Increase Scribe mobile inline button size 2026-03-25 11:52:35 +07:00
Théo Poizat 03a03b9088 Fix Scribe on responsive mobile
- Button was not added in MobileResponsiveAppBar
- Mobile behavior related scripts were not correctly added for web composer
- Mobile behavior related scripts return value was not properly handled for web composer
- In responsive web, bottomsheet modal clicks were intercepted by iframe behind
2026-03-25 11:52:35 +07:00
Théo Poizat 40030fe88e Properly escape HTML in every Scribe actions
In recent commits I separated how we could add text in the editor. So
we need to escape HTML in both method that add text:
insertTextInEditor and setTextInEditor.

I had to extract the HTML escape part of
convertTextContentToHtmlContent because when using setTextInEditor we
do not need to convert \n to <br>.
2026-03-25 11:52:35 +07:00
Théo Poizat b5606626f4 Fix more Scribe mobile issues
- Add getSavedSelection to check saved selection without consuming it
- Distinguish between setText (replace all) and insertText (at cursor) operations
- Fix replace callback to use setText when no selection exists
- Clean up saved selection state after restoration in HTML utils
- Move mobile editor focus and selection restore to appropriate callbacks
2026-03-25 11:52:35 +07:00
Théo Poizat be7f28f270 Fix Scribe mobile issues
- Fix Scribe replace on mobile when opened from menu bar (to be complete
this fix needs this PR https://github.com/Enough-Software/enough_html_editor/pull/37)
- Ensure all mobile editor call are awaited
- Do not clear text if a selection has been restored (which mean we replace a selection)
- Avoid collapseToEnd crash
2026-03-25 11:52:35 +07:00
Théo Poizat 84176cb113 Hide keyboard and selection icons when Scribe mobile modal opened
When opening Scribe mobile modal, we now unfocus the composer to hide the keyboard and the selection start and end icons from the OS.

Add new methods to save, restore, and clear text selection in HTML editor. These methods allow preserving and restoring user selection state when opening the Scribe mobile modal so that the "replace" action still works.
2026-03-25 11:52:35 +07:00
Théo Poizat 03c70922a0 Fix selection coordinates in mobile
Because the HTML editor is different, we need a different selector to get the editable element.

We also need to add a small offset to the coordinates to avoid positionning the overlay icon above native selection UI in mobile. For example, Android adds a marker at the beginning and the end of the selection and we do not want to display the Scribe overlay icon above this marker.
2026-03-25 11:52:35 +07:00
Dat H. Pham 3e39f59f20 Fixup Constant some token exception 2026-03-10 11:06:16 +07:00
dab246 437c46f5ff fix(sentry): resolve minified exception types on web release 2026-03-10 11:06:16 +07:00
dab246 2e8a11e7eb refactor(sentry): standardize exceptions to prevent Sentry minification 2026-03-10 11:06:16 +07:00
dab246 296548a781 fix(sentry): sync dist parameter to resolve minified stack traces 2026-03-10 11:06:16 +07:00
Dat H. Pham b14bb6acc0 Update ADR for OIDC token refresh 2026-02-10 16:58:58 +07:00
dab246 e55283abb8 fix: Add log trace to send log to Sentry and print to web console for validate refresh token 2026-02-10 16:58:58 +07:00
dab246 b3e5ab0df4 fix(cnb): skip local email cache and add safe email/state cache clearing
(cherry picked from commit 0e7f589df58240badc1d2340e9856882aa075b63)
2026-01-29 18:00:36 +07:00
dab246 31ed2feae4 TF-4171 Display tag in mailbox list 2026-01-19 11:34:43 +07:00
dab246 f1a86091e1 TF-4136 Fix cannot load app when init sentry is failed 2026-01-15 09:46:51 +07:00
dab246 abe42d6e22 TF-4136 Fix event reconstruction drops fields from the original event. 2026-01-15 09:46:51 +07:00
dab246 6601a48984 TF-4136 Fix DeviceInfoPlugin is instantiated on every access. 2026-01-15 09:46:51 +07:00
dab246 72e4343398 TF-4136 Remove check sentry dio interceptors duplicated 2026-01-15 09:46:51 +07:00
dab246 b6f7f7d846 TF-4136 Fix duplicate Executor instance creation. 2026-01-15 09:46:51 +07:00
dab246 944029d16c TF-4136 Move Sentry duplication guard, but keep interceptor ordering last (not first) 2026-01-15 09:46:51 +07:00
dab246 1514136f39 TF-4136 Replace logError to logWarning for some place 2026-01-15 09:46:51 +07:00
dab246 fedb8fed93 TF-4136 Apply early exit to prevent string operation in log 2026-01-15 09:46:51 +07:00
dab246 95534e28e0 TF-4136 security(sentry): scrub sensitive headers without mutating HTTP payloads 2026-01-15 09:46:51 +07:00
dab246 ec75bb3cab TF-4136 Add config Sentry 2026-01-15 09:46:51 +07:00
dab246 50671b98ee fix(mu): avoid unwanted word-break in table elements
(cherry picked from commit b9cd9933a43c75670eb960d931ee4ea39400284a)
2026-01-12 05:16:02 +07:00
dab246 a23d15a9ca TF-4136 refactor(logging): replace logError with logWarning for non-critical cases 2026-01-06 13:53:22 +07:00
dab246 73dcb6067c TF-4136 refactor(logger): unify logging format and route error reporting 2026-01-06 13:53:22 +07:00
Dang Dat 060416292f fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 7b8e95de9a fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 9f1373c7e5 fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 3d08fc9e5f fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat a8f90ec700 fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 86dec27d67 fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 2b909aeb1c TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat a31898185e [Memory leak] Handle dispose in MobileEditorWidget 2025-12-29 10:11:56 +07:00
dab246 2b70b660f0 hotfix(ai-scribe): With a lot of content and selecting all content, do not see the AI selection button 2025-12-23 17:26:28 +07:00
Dat H. Pham 0a8ec3fbc0 fix: add console error to log text selection failed 2025-12-19 19:03:39 +07:00
dab246 6e09d853fd feat(ai-scribe): Fix the English locale file `(intl_en.arb)` is missing all three AI Scribe keys
feat(ai-scribe): Fix async function declared without proper return type annotation.

feat(ai-scribe): Fix Async operations not properly awaited.

feat(ai-scribe): Fix inconsistent capitalization between button labels.

feat(ai-scribe): Fix GenerateAITextFailure check will never match.

feat(ai-scribe): Fix consider validating text input for predefined actions.

feat(ai-scribe): Using a subshell for directory isolation.

feat(ai-scribe): Fix verify the mock usage or document intent.

feat(ai-scribe): Using a more conventional import for Offset.

feat(ai-scribe): Adding error handling for consistency

feat(ai-scribe): Remove `fromJson` and `toJson` of AIResponse

feat(ai-scribe): Using constants for role values.

feat(ai-scribe): Using a more specific import.

feat(ai-scribe): Using Timer for cleaner lifecycle management

feat(ai-scribe): Adding error handling to fromMap() for consistency.

feat(ai-scribe): Disposing the ValueNotifier

feat(ai-scribe): Redundant null check after assignment

feat(ai-scribe): Fix calling `registerSelectionChangeListener` multiple times may be inefficient.

feat(ai-scribe): Safer type handling for JavaScript callback args

feat(ai-scribe): Fix async callbacks not awaited in switch statement.

feat(ai-scribe): Fix binding lifecycle mismatch for GetAIScribeConfigInteractor

feat(ai-scribe): Fix ai prompts

feat(ai-scribe): Fix unawaited async call to `_setupSelectionListener`

feat(ai-scribe): Fix switch cases use top-origin coordinates while `PositionedDirectional(bottom:)`` expects bottom-origin coordinates.

feat(ai-scribe): Adding error handling for selection listener setup.
2025-12-19 19:03:39 +07:00
dab246 b3dd6a9e85 feat(ai-scribe): Fix missing HTML entity escaping creates correctness and potential security issues 2025-12-19 19:03:39 +07:00
Théo Poizat c78f6b8a76 Improve text replace in Scribe
- Delete selection content before inserting
- Insert correct HTML
2025-12-19 19:03:39 +07:00
Théo Poizat 1a79445711 Add a method to delete selection content 2025-12-19 19:03:39 +07:00
dab246 57bfb4f88f feat(ai-scribe): Fix when using multiple composer, get multiple overlay icons 2025-12-19 19:03:39 +07:00
Théo Poizat 8ed8100e7e Add JS method to collapse selection in both composer
Collapsing a selection means removing it and keep the cursor at the
end. It will be needed by the scribe for "Insert" action where we
want to insert a text at the cursor even if the user selected text.
2025-12-19 19:03:39 +07:00
Théo Poizat e7405051d1 fixup! Use html parser instead of regex to clean composer input
Improve efficiency and add more tests in convertHtmlContentToTextContent
2025-12-19 19:03:39 +07:00
Théo Poizat a9cfe86a59 Use html parser instead of regex to clean composer input
Before sending input to the LLM, we clean the composer input to
remove html tags. We relied on regex that we not complete enough and
could be bypassed easily. So let's use the html parser available in
Dart instead.

I also added some tests.
2025-12-19 19:03:39 +07:00