Commit Graph

15431 Commits

Author SHA1 Message Date
hayaksi1 0aa283729c Cover every branch of the forward pagination gate
Codecov reported 55.55% patch coverage on the previous commit: four of the nine
measured lines were only partially covered. No test paginates forwards in a
thread timeline, and the focus states Requested, Loading and Failure were never
live when a forward pagination arrived, so only the Success branch of
isPending() was ever evaluated both ways.

Add a test per uncovered state: a forward pagination is deferred while the focus
request is still being debounced and while the focused timeline is being
created, it is performed again once the request has failed, and it is dropped in
a thread timeline while a backward one still goes through.

The pagination recorder now also sits on the live timeline, and the presenter is
built on that same timeline. Before the detached timeline exists, a pagination
that escaped the gate would go to the live one, so without this the new guards
would pass against the unfixed presenter. The deferred cases end on the emitted
state rather than on cancelAndIgnoreRemainingEvents for the same reason: the
recorder throws from inside the presenter coroutine and cancelling swallows it.

Verified by reverting the gate: the three deferred-pagination tests then fail
with "This lambda should never be called."
2026-08-18 00:49:03 +03:00
hayaksi1 11e3cb9b19 Keep a focused timeline focused until the event has been rendered
Opening a room from a notification asks the timeline to focus the notified
event. When that event is outside the loaded live window the controller
creates a detached timeline for it, and a detached timeline always carries a
forward loading indicator as its last chronological item. The items list is
reversed for display, so that indicator is the bottom-most row and is composed
on first layout, which unconditionally emits a forward pagination request
nobody asked for. Because a notified event sits close to the live end, that one
page reaches the end, and the controller responds by closing the detached
timeline. The live window replaces the item list while it is still anchored at
the bottom, so the user lands on the newest message and the focus request is
discarded.

Defer automatic forward pagination while a focus request is still pending. Once
the focused event has been rendered the viewport has moved off the indicator
row, so only a real scroll back to the live end switches to the live timeline,
which is what the controller's existing behaviour is for. Backward pagination
and the explicit jump-to-live action are untouched.
2026-08-17 16:20:43 +03:00
hayyaksi 12791406ca Explain a rate limiting push gateway in the notification troubleshooter (#7448)
* Explain a rate limiting push gateway in the notification troubleshooter

The push loop back test printed whatever HTTP status the gateway
answered, so a user throttled by the public ntfy.sh gateway was told
"Error: HTTP 507", which reads as a server fault rather than as a quota
they can wait out or move away from.

Map the two statuses that mean the notification was throttled onto a
typed failure and give the troubleshooter a message that says what to do.

* Import strings from localazy, remove `temporary.xml` in `:libraries:push:impl`

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-08-17 15:14:15 +02:00
Benoit Marty 98c3067514 Merge pull request #7432 from element-hq/renovate/org.maplibre.compose-maplibre-compose-0.x
Update dependency org.maplibre.compose:maplibre-compose to v0.14.0
2026-08-17 14:50:27 +02:00
Benoit Marty 5a71cc31e8 Merge pull request #7461 from element-hq/feature/bma/syncStrings
Sync strings - New language supported: Arabic
2026-08-17 14:30:02 +02:00
Benoit Marty 054d592391 Sync again 2026-08-17 12:10:39 +02:00
Benoit Marty 5ac1fe2409 Remove temporary string. 2026-08-17 12:10:18 +02:00
Benoit Marty a740423343 Sync strings. 2026-08-17 11:34:52 +02:00
renovate[bot] 1a3b89de12 Update dependency io.github.sergio-sastre.ComposablePreviewScanner:android to v0.9.2 (#7431)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-17 07:33:18 +00:00
renovate[bot] 45057b35a5 Update dependency org.maplibre.compose:maplibre-compose to v0.14.0 2026-08-15 09:07:16 +00:00
Benoit Marty 23b75c3423 Fix outdated documentation. (#7430) 2026-08-15 11:05:43 +02:00
Benoit Marty e1adc938fd Merge pull request #7424 from element-hq/revert-7378-fix/6853-remember-revealed-images
Revert "Keep manually revealed media visible when re-entering a room"
2026-08-14 17:37:31 +02:00
Benoit Marty 9e32801d02 Merge pull request #7426 from element-hq/feature/bma/documentation
Add KDoc to all the interfaces of the api modules
2026-08-14 13:46:28 +02:00
Benoit Marty 7d9f4b9af4 Fix outdated documentation. 2026-08-14 12:22:37 +02:00
Benoit Marty 1ab401482a Fix formatting issues 2026-08-14 12:20:49 +02:00
renovate[bot] 2c94cee575 Update dependency org.matrix.rustcomponents:sdk-android to v26.08.13 (#7420)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-14 12:18:43 +02:00
Benoit Marty b74b146917 Add KDoc to the single-interface library and service API modules
Cover the last remaining interfaces across libraries/audio, libraries/cachestore,
libraries/indicator, libraries/slashcommands, libraries/voiceplayer and
services/apperror, with their members and parameters.

This completes the effort: all 222 in-scope interfaces and their 820 members in
the 60 api modules that hold any now carry documentation.

Notable points: CacheStore applies no expiry of its own and only records when each
entry was written, leaving staleness to the caller; SlashCommandService.parse
never throws, returning NotACommand for ordinary text and an error case for a
malformed command.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:04:40 +02:00
Benoit Marty 9822b3d4f7 Add KDoc to the single-interface feature API modules
Cover the last remaining interfaces across features/announcement, cachecleaner,
call, contentscanner, createroom, knockrequests, lockscreen, rolesandpermissions,
startchat, userprofile and viewfolder, with their members and parameters.

Grouped into one commit rather than eleven near-empty ones, per the AGENTS.md rule
about tiny commits.

This completes every features/* api module.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:00:42 +02:00
Benoit Marty 1b4d6c07fa Add KDoc to the authentication, logout, preferences and share API interfaces
Cover the remaining interfaces of features/login, features/logout,
features/preferences and features/share, along with their members and parameters.

Points recorded here: AccountProviderAccessControl returns true on a build with no
enterprise restriction, ExtraDeveloperOptionsRenderer is bound to a no-op in the
standard build, DirectLogoutView draws nothing until a logout event is sent, and
CacheService exists because clearing a cache destroys the client and the app has
to react.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:53:37 +02:00
Benoit Marty fa123d941b Add KDoc to the features/invite API interfaces
Document AcceptDeclineInviteEvents, AcceptDeclineInviteView and the
SeenInvitesStore interface.

The view doc explains why it is a shared component rather than part of one screen:
it is embedded everywhere an invitation can be acted on, so the confirmation
dialogs behave identically in the invite list and in a room preview.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:51:32 +02:00
Benoit Marty d713017afe Add KDoc to the libraries/cryptography API interfaces
Document the members of SecretKeyRepository and EncryptionDecryptionService.

The caveat worth having in the API doc comes from KeyStoreSecretKeyRepository:
requiresUserAuthentication only takes effect when the key is created, so an
existing key keeps whatever protection it was created with.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:51:32 +02:00
Benoit Marty b683c62d8f Add KDoc to the services/appnavstate API interfaces
Document the members of AppNavigationStateService and AppForegroundStateService
that had none, and add the missing @param entries.

The recurring `owner` parameter is now explained, from
DefaultAppNavigationStateService: the navigation state is a stack, pushing a level
without its parent logs an error and does nothing, and a leave call whose owner
does not match the current level is silently ignored so that a node which has
already been replaced cannot pop someone else's state.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:50:13 +02:00
Benoit Marty c4c7dac9cf Add KDoc to the features/rageshake API interfaces
Document RageshakeFeatureAvailability, LogFilesRemover and the BugReporter
interface, and complete the docs of its remaining members.

The BugReporter doc records that progress and the outcome arrive through the
listener passed to sendBugReport rather than through a return value or an
exception.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:48:59 +02:00
Benoit Marty 57658640e1 Add KDoc to the features/location API interfaces
Document LocationService, StaticMapUrlBuilder, TileServerStyleUriBuilder and the
members of ActiveLiveLocationShareManager that had none.

The two URL builders now say what happens when no map provider is configured for
the build, which is the case LocationService.isServiceAvailable exists to guard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:48:58 +02:00
Benoit Marty 2284cff25a Add KDoc to six small library API modules
Cover the remaining interfaces of libraries/troubleshoot, libraries/matrixmedia,
libraries/dateformatter, libraries/featureflag, libraries/workmanager and
libraries/mediaviewer, along with their members and parameters.

Behaviours worth recording: NotificationTroubleshootTest reports its outcome
through its state flow rather than by returning, and its quickFix throws unless
the test offers one; DateFormatter.format turns a null timestamp into an empty
string so callers need no null check; ImageLoaderHolder keeps one loader per
session because decrypting room media needs that session's client.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:43:40 +02:00
Benoit Marty d80aaf6be4 Add KDoc to the libraries/mediapickers API interfaces
Document PickerProvider and each of its register methods.

The interface doc carries the two rules that apply to all of them: they must be
called during composition rather than from a click handler, and a cancelled pick
arrives as a null uri or an empty list rather than as an error.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:24:05 +02:00
Benoit Marty 13aad55af8 Add KDoc to the libraries/pushproviders API interfaces
Document PusherSubscriber and PushHandler at the interface level, document the
PushProvider members that had none, and add the missing @param entries.

Notable points: getCurrentDistributor also returns null when the stored
distributor is no longer installed, rotateToken throws unless canRotateToken is
true, and handleInvalid records the payload in the push history for diagnosis.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:24:04 +02:00
Benoit Marty 012d43665f Add KDoc to the libraries/session-storage API interfaces
Document SessionStore, SessionObserver and SessionListener at the interface level
and add the missing @param entries.

The store doc records that sessions are ordered by last usage, which is what makes
"the latest session" meaningful across the rest of the interface, and the listener
doc explains that wasLastSession is the signal to clean up app-wide data too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:24:04 +02:00
Benoit Marty c32f81f696 Revert "Keep manually revealed media visible when re-entering a room" 2026-08-14 10:49:24 +02:00
Benoit Marty 4a5d0d2540 Add KDoc to the services/analyticsproviders API interfaces
Document AnalyticsProvider, AnalyticsTransaction, AnalyticsTracker and
ErrorTracker at the interface level, and add the missing @param entries.

The provider doc records that providers are driven by the analytics service and
only receive data once the user has consented, and that startTransaction returns
null on a provider with no performance support.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:31:34 +02:00
Benoit Marty aa7dc4fd0d Add KDoc to the services/toolbox API interfaces
Add the interface level docs that StringProvider, SystemClock and
BuildVersionSdkIntProvider were missing, document ExternalIntentLauncher.launch,
and add the remaining @param entries.

Each doc says why the abstraction exists rather than restating the signature:
these wrap Context, Build.VERSION and the clock so that presenters can be tested
without them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:31:33 +02:00
Benoit Marty c561674221 Add KDoc to the libraries/oauth API interfaces
Document OAuthIntentResolver and OAuthActionFlow along with their members.

OAuthActionFlow now explains why it exists rather than the result simply being
returned: the activity that receives the redirect and the login screen waiting for
it are not in the same navigation subtree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:28:56 +02:00
Benoit Marty 1f3c73d3c6 Add KDoc to the libraries/usersearch API interfaces
Document UserRepository and UserListDataSource along with their members.

Two behaviours from MatrixUserRepository and MatrixUserListDataSource are recorded
because callers rely on them: the data source swallows a failed directory request
into an empty list, and a query that is a well-formed user id other than the
current user's yields that user even when the directory does not know them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:28:56 +02:00
Benoit Marty 6446b30255 Add KDoc to the libraries/eventformatter API interfaces
Document RoomLatestEventFormatter, TimelineEventFormatter and
PinnedMessagesBannerFormatter along with their members.

The formatters return a nullable CharSequence, so each one now states what null
means: the event is not rendered as text at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:28:48 +02:00
Benoit Marty c0848cee9d Add KDoc to the libraries/deeplink API interfaces
Document DeeplinkParser, DeepLinkCreator and InviteFriendsUseCase, including that
DeepLinkCreator.create silently ignores the deeper arguments once an outer one is
null.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:28:47 +02:00
Benoit Marty 055fe408a6 Add KDoc to the features/roommembermoderation API interfaces
Document RoomMemberModerationState, RoomMemberModerationEvents and
RoomMemberModerationRenderer along with their members and parameters.

The renderer doc states that it draws nothing until the host screen asks for a
member's actions, and that onSelectAction exists so the host can navigate for the
actions that need a screen of their own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:06:53 +02:00
Benoit Marty 50214fe01a Add KDoc to the features/poll API interfaces
Document PollContentStateFactory, SendPollResponseAction and EndPollAction along
with their members and parameters.

The two action interfaces exist to wrap a plain timeline call, so their docs say
what they add: both capture an analytics event on success, which is the reason
callers should go through them rather than calling the timeline directly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:06:47 +02:00
Benoit Marty 76411b07fb Add KDoc to the features/leaveroom API interfaces
Document LeaveRoomState, LeaveRoomEvent and LeaveRoomRenderer.

The renderer doc records the two things a host screen needs to know, both taken
from LeaveRoomPresenter and LeaveRoomView: it draws nothing until a leave event is
sent, and onSelectNewOwners fires specifically when the user is the last owner of
a room that still has other members.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:05:31 +02:00
Benoit Marty 49f1284116 Merge pull request #7414 from element-hq/renovate/io.sentry-sentry-android-8.x
Update dependency io.sentry:sentry-android to v8.52.0
2026-08-14 10:05:20 +02:00
Benoit Marty bc6f237507 Add KDoc to the features/invitepeople API interfaces
Document InvitePeopleState and each of its properties, InvitePeopleEvents,
InvitePeopleRenderer and the presenter factory.

The state properties now say what drives them, in particular that
createRoomFromDmAction covers the case of inviting a third person into an
existing direct message, and that the factory accepts a null room for that flow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:04:31 +02:00
Benoit Marty d52e8398ba Merge pull request #7423 from element-hq/renovate/roborazzi
Update roborazzi to v1.71.0
2026-08-14 10:03:33 +02:00
Benoit Marty 186d5b65b9 Add KDoc to the features/messages API interfaces
Document HtmlConverterProvider, MessageComposerContext,
PinnedEventsTimelineProvider, the MessagesEntryPoint node proxy and the voice
message composer factory.

HtmlConverterProvider carries the ordering constraint that matters: the converter
is rebuilt from the Compose theme, so Update has to be composed before provide is
called.

MessagesEntryPoint and its Callback are navigation plumbing and out of scope.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:02:48 +02:00
Benoit Marty 3db3f31b03 Merge pull request #7419 from element-hq/rav/feature_flags
Add hooks to allow providing additional feature flags in EX pro
2026-08-14 10:02:48 +02:00
Benoit Marty 7f3d896a3e Add KDoc to the features/enterprise API interfaces
Document EnterpriseService, SessionEnterpriseService and
RemoteEnterpriseConfigProvider along with all their members and parameters.

Two points that callers get wrong are stated explicitly: these services return
permissive defaults on a standard build, so there is no need to branch on the
build type, and SessionEnterpriseService only answers meaningfully once init has
run. The many nullable getters now say what null means in each case, which is
generally "no override, use the app default".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:01:14 +02:00
Benoit Marty 0a47aefdf7 Add KDoc to the libraries/permissions API interfaces
Document PermissionsStore, PermissionStateProvider, LocalNetworkPermissionAdvisor
and the PermissionsPresenter factory, along with their members and parameters.

The store doc explains why the module exists: Android does not let an app
distinguish "never asked" from "asked and denied", so the app has to remember
that itself in order to decide whether it may show a rationale.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:57:38 +02:00
Benoit Marty a90801bcec Add KDoc to the libraries/pushstore API interfaces
Document UserPushStore, UserPushStoreFactory, PushClientSecret,
PushClientSecretStore and PushClientSecretFactory along with all their members.

The client secret interfaces now explain why they exist at all: a push gateway
delivers notifications without saying which account they belong to, so the secret
is what lets an incoming push be attributed back to a session.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:56:28 +02:00
Benoit Marty c6af196bf0 Add KDoc to the libraries/wellknown API interfaces
Document WellknownRetriever, ElementWellknownStore, ElementWellKnownParser and
their factories, along with every member.

The caching semantics are the part callers need and cannot see in the signatures,
so they are recorded here: the store reports entries older than a day as outdated
rather than missing, the retriever returns such a value immediately and refreshes
in the background, an enterprise build with a hardcoded configuration
short-circuits entirely, and the parser ignores unknown JSON fields.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:50:08 +02:00
Benoit Marty 23a346907c Add KDoc to the libraries/mediaupload API interfaces
Document MediaSender and all its members, its two factories, MediaPreProcessor,
MaxUploadSizeProvider and MediaOptimizationConfigProvider.

The MediaSender doc explains the two-step shape of the API, which the individual
signatures do not convey: pre-processing and sending are separate so a preview
can be shown in between, and the temporary files that pre-processing creates are
only released by cleanUp, whether or not anything was ultimately sent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:44:42 +02:00
Benoit Marty 414d2b5dd0 Add KDoc to the libraries/emoji API interfaces
Document AddRecentEmoji, GetRecentEmojis.invoke, the EmojiPickerRenderer
interface and the EmojiPickerPresenter factory, pointing at the no-op renderer
and the empty recent-emoji source so callers know how to opt out of each.

EmojiPickerPresenter itself is a Presenter and therefore out of scope.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:39:36 +02:00
Benoit Marty 7462c5f366 Add KDoc to the services/analytics API interfaces
Document AnalyticsService and ScreenTracker at the interface level, document the
members of the cold start and room list watchers, and add the missing @param
entries across the analytics interfaces.

The AnalyticsService doc states the rule that applies to the whole interface:
nothing reaches the providers until the user has given their consent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:38:36 +02:00