Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .silo-translations
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
platform=android
version=2026.11.23-73e6a54
sha256=86e06e01b86d10bf79d824a9cd2c5307fbee294857b81bd655246f4ce6b86498
version=local-57fd74b4c7c3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocks merge: the strings are pinned to a local catalog build. version=local-… with sha256=- names a commit that isn't a published silo-translations release, and CI's check-translations fails on it (the Select CI work job). The catalog PR, Silo-Server/silo-translations#205, was also missing its translation pass, so translations-complete failed there.

I've pushed the translation pass to #205 and re-synced this branch against it with --local. Once #205 merges and its release publishes, this branch needs scripts/sync-translations --version <release>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed the translation pass to Silo-Server/silo-translations#205 (ec136c7, 18 keys in 38 languages, validator clean) and re-synced this branch against it in 302fe77. The re-pin to a published release still has to wait for #205 to merge.

🤖 Claude Code (claude-opus-5-5)

sha256=-
2 changes: 1 addition & 1 deletion android-shared/silo-locales.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by silo-translations 2026.11.23-73e6a54 from catalog/*.arb; do not edit.
# Generated by silo-translations local-57fd74b4c7c3 from catalog/*.arb; do not edit.
# Resource qualifiers per app, for androidResources.localeFilters.
phone=en,es,de,fr,pt-rBR,nl,it,pl,tr,sv,da,nb,fi,cs,hr,ru,uk,ja,ko,b+zh+Hans,b+zh+Hant,ar,hu,ro,sk,sl,bg,el,ca,lt,lv,et,vi,pt-rPT,in,ms,iw,hi,th
tv=en,es,de,fr,pt-rBR,nl,it,pl,tr,sv,da,nb,fi,cs,hr,ru,uk,ja,ko,b+zh+Hans,b+zh+Hant,ar,hu,ro,sk,sl,bg,el,ca,lt,lv,et,vi,pt-rPT,in,ms,iw,hi,th
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.siloserver.silo.common.catalog

import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import org.siloserver.silo.common.R
import org.siloserver.silo.common.i18n.LocaleFormat
import org.siloserver.silo.common.i18n.currentNumberLocale
import org.siloserver.silo.model.catalog.BrowseItem

/** A Settings → Not Interested row's caption: "2004 · Movie", or the kind alone without a year. */
@Composable
fun BrowseItem.notInterestedCaption(): String = listOfNotNull(
year.takeIf { it > 0 }?.let { LocaleFormat.integer(it, currentNumberLocale()) },
stringResource(if (type == "series") R.string.settings_notInterested_series else R.string.settings_notInterested_movie),
).joinToString(" · ")
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.siloserver.silo.common.data.db.entity.DirtyOperationEntity
import org.siloserver.silo.network.ApiResult
import org.siloserver.silo.network.AuthScopeSnapshot
import org.siloserver.silo.network.TokenManager
import org.siloserver.silo.network.map
import org.siloserver.silo.network.apiv2.MembershipV2Api

/**
Expand All @@ -24,7 +25,7 @@ class MembershipOutbox(
private val processOwner: String,
) {
data class Authority(val key: String, val scope: AuthScopeSnapshot)
enum class ListKind { FAVORITE, WATCHLIST }
enum class ListKind { FAVORITE, WATCHLIST, NOT_INTERESTED }
enum class Resolution { ACKNOWLEDGED, RECONCILED, NEEDS_RECONCILIATION, PAUSED, NOT_CLAIMED }
data class Result(val resolution: Resolution, val mayPublish: Boolean = false)

Expand Down Expand Up @@ -66,6 +67,8 @@ class MembershipOutbox(
else api.removeFavorite(command.targetContentId, authority.scope)
"MEMBERSHIP_WATCHLIST" -> if (present) api.addToWatchlist(command.targetContentId, authority.scope)
else api.removeFromWatchlist(command.targetContentId, authority.scope)
"MEMBERSHIP_NOT_INTERESTED" -> if (present) api.markNotInterested(command.targetContentId, authority.scope)
else api.clearNotInterested(command.targetContentId, authority.scope)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Definite not-interested clear refusals are treated as unknown outcomes

A definite 4xx refusal from clearNotInterested is sent to reconciliation and can remain unresolved if the follow-up read fails. Surface definite refusals directly while continuing to reconcile ambiguous network and 5xx outcomes.

Also found in:

  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/sync/MembershipOutbox.kt:70-70

Kody rule violation: Reconcile ambiguous mutation outcomes without replaying them

Prompt for LLM
File android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/sync/MembershipOutbox.kt, line 71:

Definite not-interested clear refusals are treated as unknown outcomes

Handle a definite 4xx refusal from this mutation separately from an ambiguous network or 5xx outcome. The shared response handling currently sends every non-success into reconciliation, so a refused clear is not reported directly and can remain unresolved if the follow-up read fails. Extend the result and response handling to surface definite refusals while reconciling unknown outcomes.

**Also found in:**
- `android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/sync/MembershipOutbox.kt:70-70`

Kody rule violation: [Reconcile ambiguous mutation outcomes without replaying them](https://kodus.siloserver.org/settings/code-review/1247142403/kody-rules/12d2fb1e-2010-487a-b35d-d4feb93e724b?teamId=ba9922fc-c0ea-4cf8-87bb-9d4f42ffc73e)

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed: this is the outbox's rule for every membership kind. Favorites and Watchlist send a 4xx to reconciliation the same way on main, and docs/membership-api-v2.md documents it (single attempt, then a read). Not interested only joins that path.

🤖 Claude Code (claude-opus-5-5)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. Since the existing membership contract explicitly specifies a single mutation attempt followed by reconciliation, and this change applies that same behavior to Not Interested, I would not require a separate 4xx handling change in this PR.

The possibility of an unresolved outcome if the follow-up read fails is a broader outbox concern, not a regression introduced by this change.

else -> error("Invalid membership operation")
}
if (response is ApiResult.Success) {
Expand All @@ -91,14 +94,15 @@ class MembershipOutbox(
command.profileId != authority.scope.profileId.orEmpty() || command.state !in listOf(RECONCILE, PAUSED) ||
authority.scope != tokens.snapshotCurrentScope()) return Result(Resolution.NOT_CLAIMED)
val claim = command.membershipClaim ?: return Result(Resolution.NOT_CLAIMED)
val response = when (command.opKind) {
"MEMBERSHIP_FAVORITE" -> api.favorite(command.targetContentId, authority.scope)
"MEMBERSHIP_WATCHLIST" -> api.watchlist(command.targetContentId, authority.scope)
val response: ApiResult<Boolean> = when (command.opKind) {
"MEMBERSHIP_FAVORITE" -> api.favorite(command.targetContentId, authority.scope).map { it != null }
"MEMBERSHIP_WATCHLIST" -> api.watchlist(command.targetContentId, authority.scope).map { it != null }
"MEMBERSHIP_NOT_INTERESTED" -> api.notInterested(command.targetContentId, authority.scope).map { it != null }
else -> return Result(Resolution.PAUSED)
}
if (authority.scope != tokens.snapshotCurrentScope()) return Result(Resolution.NEEDS_RECONCILIATION)
if (response !is ApiResult.Success) return Result(Resolution.NEEDS_RECONCILIATION)
if ((response.data != null) == command.payloadJson.toBooleanStrict()) {
if (response.data == command.payloadJson.toBooleanStrict()) {
val removed = dao.resolveMembership(id, claim, authority.key, command.state) == 1
// Observed state is not an acknowledgement that mutation side effects were replayed.
return Result(if (removed) Resolution.RECONCILED else Resolution.NOT_CLAIMED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ class RoomMembershipPort(

override suspend fun read(authority: DurableLoginAuthority, itemId: String, kind: MembershipPort.Kind): ApiResult<Boolean> {
if (authority != runtime.captureAuthority()) return ApiResult.Error(0, "identity_changed", "The viewer changed")
val result = if (kind == MembershipPort.Kind.FAVORITE) api.favorite(itemId, authority.scope)
else api.watchlist(itemId, authority.scope)
val result = when (kind) {
MembershipPort.Kind.FAVORITE -> api.favorite(itemId, authority.scope).map { it != null }
MembershipPort.Kind.WATCHLIST -> api.watchlist(itemId, authority.scope).map { it != null }
MembershipPort.Kind.NOT_INTERESTED -> api.notInterested(itemId, authority.scope).map { it != null }
}
if (authority != runtime.captureAuthority()) return ApiResult.Error(0, "identity_changed", "The viewer changed")
return result.map { it != null }
return result
}

override suspend fun pending(authority: DurableLoginAuthority, limit: Int): List<MembershipPort.Command> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.siloserver.silo.common.R
import org.siloserver.silo.repository.MembershipActions
import org.siloserver.silo.repository.port.MembershipPort

/** What a Favorites or Watchlist change that didn't land tells the viewer; each app draws it as its own dialog. */
/** What a Favorites, Watchlist or Not Interested change that didn't land tells the viewer; each app draws it as its own dialog. */
data class MembershipNotice(
val title: String,
val message: String,
Expand Down Expand Up @@ -89,18 +89,20 @@ private fun unconfirmedNotice(
onDismiss: () -> Unit,
onAction: () -> Unit,
): MembershipNotice {
val favorite = action.intent.key.kind == MembershipPort.Kind.FAVORITE
val kind = action.intent.key.kind
val adding = action.intent.present
val recorded = action.command != null
if (action.completion?.disposition == MembershipPort.Disposition.PAUSED) {
return MembershipNotice(
title = stringResource(R.string.shell_membership_notSaved_title),
message = stringResource(
when {
favorite && adding -> R.string.shell_membership_notSaved_addFavorite
favorite -> R.string.shell_membership_notSaved_removeFavorite
adding -> R.string.shell_membership_notSaved_addWatchlist
else -> R.string.shell_membership_notSaved_removeWatchlist
when (kind) {
MembershipPort.Kind.FAVORITE -> if (adding) R.string.shell_membership_notSaved_addFavorite
else R.string.shell_membership_notSaved_removeFavorite
MembershipPort.Kind.WATCHLIST -> if (adding) R.string.shell_membership_notSaved_addWatchlist
else R.string.shell_membership_notSaved_removeWatchlist
MembershipPort.Kind.NOT_INTERESTED -> if (adding) R.string.shell_membership_notSaved_markNotInterested
else R.string.shell_membership_notSaved_clearNotInterested
},
),
actionLabel = stringResource(R.string.shell_membership_checkStatus),
Expand All @@ -109,11 +111,13 @@ private fun unconfirmedNotice(
)
}
val unconfirmed = stringResource(
when {
favorite && adding -> R.string.shell_membership_notConfirmed_addFavorite
favorite -> R.string.shell_membership_notConfirmed_removeFavorite
adding -> R.string.shell_membership_notConfirmed_addWatchlist
else -> R.string.shell_membership_notConfirmed_removeWatchlist
when (kind) {
MembershipPort.Kind.FAVORITE -> if (adding) R.string.shell_membership_notConfirmed_addFavorite
else R.string.shell_membership_notConfirmed_removeFavorite
MembershipPort.Kind.WATCHLIST -> if (adding) R.string.shell_membership_notConfirmed_addWatchlist
else R.string.shell_membership_notConfirmed_removeWatchlist
MembershipPort.Kind.NOT_INTERESTED -> if (adding) R.string.shell_membership_notConfirmed_markNotInterested
else R.string.shell_membership_notConfirmed_clearNotInterested
},
)
val next = stringResource(
Expand Down
18 changes: 16 additions & 2 deletions android-shared/src/androidMain/res/values-ar/strings_catalog.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated by silo-translations 2026.11.23-73e6a54 from catalog/*.arb; do not edit. -->
<!-- Generated by silo-translations local-57fd74b4c7c3 from catalog/*.arb; do not edit. -->
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="account_backToSignIn">العودة إلى تسجيل الدخول</string>
<string name="account_create_creating">جارٍ الإنشاء…</string>
Expand Down Expand Up @@ -259,9 +259,11 @@
<string name="calendar_tomorrow">غدًا</string>
<string name="calendar_watched">تمت المشاهدة</string>
<string name="cardMenu_addWatchlist">إضافة إلى قائمة المشاهدة</string>
<string name="cardMenu_notInterested">غير مهتم</string>
<string name="cardMenu_play">تشغيل</string>
<string name="cardMenu_removeContinueWatching">إزالة من متابعة المشاهدة</string>
<string name="cardMenu_resume">استئناف</string>
<string name="cardMenu_showInRecommendations">العرض في التوصيات</string>
<string name="cast_button">إرسال</string>
<string name="cast_miniBar_casting">جارٍ الإرسال</string>
<string name="cast_miniBar_connected">متصل</string>
Expand Down Expand Up @@ -1154,6 +1156,7 @@
<string name="error_account_disabled">هذا الحساب معطّل.</string>
<string name="error_account_required">تحتاج إلى حساب على هذا الخادم.</string>
<string name="error_already_linked">هذا مرتبط بالفعل بهذا الحساب.</string>
<string name="error_app_code_invalid">هذا الرمز غير معروف أو مستخدم أو منتهي الصلاحية. احصل على رمز جديد من صفحة الخادم.</string>
<string name="error_authentication_required">سجّل الدخول للمتابعة.</string>
<string name="error_backup_unauthenticated">تعذّر التحقق من هذه النسخة الاحتياطية.</string>
<string name="error_break_glass_required">أبقِ مسؤولًا واحدًا على الأقل يمكنه تسجيل الدخول بكلمة المرور.</string>
Expand All @@ -1174,11 +1177,17 @@
<string name="error_field_invalid_enum">اختر إحدى القيم المسموح بها.</string>
<string name="error_field_invalid_sort_field">يحدد الفرز حقلًا لا تفرز هذه العملية حسبه، أو يحدد حقلًا مرتين.</string>
<string name="error_field_invalid_type">نوع هذه القيمة غير صحيح.</string>
<string name="error_field_key_enrolled">هذا المفتاح مستخدم بالفعل على هذا الخادم.</string>
<string name="error_field_malformed_form">تعذّرت قراءة الملف المرفوع.</string>
<string name="error_field_malformed_json">تعذّرت قراءة الطلب.</string>
<string name="error_field_managed_by_environment">يُعيَّن هذا الخيار من البيئة. غيّره هناك وأعد تشغيل الخدمة المتأثرة.</string>
<string name="error_field_missing">هذه القيمة مفقودة.</string>
<string name="error_field_out_of_range">هذه القيمة خارج النطاق المسموح.</string>
<string name="error_field_password_needs_special">أدرج رمزًا خاصًا واحدًا على الأقل، مثل ! أو #.</string>
<string name="error_field_password_needs_uppercase">أدرج حرفًا لاتينيًا كبيرًا واحدًا على الأقل.</string>
<string name="error_field_password_too_long">كلمة المرور هذه طويلة جدًا.</string>
<string name="error_field_password_too_short">كلمة المرور هذه قصيرة جدًا.</string>
<string name="error_field_reordered_series">يستخدم هذا المسلسل ترتيب حلقات خاصًا به. أعد تعيين المسلسل بأكمله بدلًا من موسم أو حلقة واحدة.</string>
<string name="error_field_required">هذا الحقل مطلوب.</string>
<string name="error_field_unknown_field">هذا الحقل غير معروف.</string>
<string name="error_field_unknown_parameter">هذه المعلمة غير معروفة.</string>
Expand Down Expand Up @@ -1221,6 +1230,7 @@
<string name="error_request_timeout">استغرق الطلب وقتًا طويلًا. حاول مرة أخرى.</string>
<string name="error_restore_set_changed">تغيّرت النسخة الاحتياطية منذ اخترتها. اخترها مرة أخرى.</string>
<string name="error_session_expired">انتهت صلاحية الجلسة. سجّل الدخول مرة أخرى.</string>
<string name="error_sign_in_provider_required">عندما يكون تسجيل الدخول بكلمة المرور معطّلًا، يجب أن يبقى مفعّلًا مزود تسجيل دخول يمكن للمستخدمين استخدامه. ويحتاج OpenID Connect أيضًا إلى عنوان URL العام للخادم.</string>
<string name="error_snapshot_request_conflict">هناك مزامنة أخرى قيد التشغيل. حاول مرة أخرى بعد قليل.</string>
<string name="error_sync_reset_required">يجب مزامنة تقدم المشاهدة من جديد. أعد التحميل وحاول مرة أخرى.</string>
<string name="error_token_refresh_required">يجب تحديث تسجيل الدخول. حاول مرة أخرى.</string>
Expand Down Expand Up @@ -3502,6 +3512,10 @@
<string name="settingsManifest_playback_cellular_preferred_quality_option_480p">480p</string>
<string name="settingsManifest_playback_cellular_preferred_quality_option_720p">720p</string>
<string name="settingsManifest_playback_cellular_preferred_quality_option_auto">تلقائي</string>
<string name="settingsManifest_playback_connection_path_description">لا يزال خيار «مباشر فقط» يستخدم اتصال الشبكة المحلية عند توفره.</string>
<string name="settingsManifest_playback_connection_path_label">مسار الاتصال</string>
<string name="settingsManifest_playback_connection_path_option_automatic">تلقائي</string>
<string name="settingsManifest_playback_connection_path_option_direct_only">مباشر فقط</string>
<string name="settingsManifest_playback_intro_skip_mode_description">ما يفعله Silo عند بدء المقدمة: تركها، أو عرض زر «تخطي المقدمة»، أو تخطيها مع إتاحة التراجع.</string>
<string name="settingsManifest_playback_intro_skip_mode_label">تخطي المقدمات</string>
<string name="settingsManifest_playback_intro_skip_mode_option_always">التخطي تلقائيًا</string>
Expand Down Expand Up @@ -4140,7 +4154,7 @@
<string name="upNext_onDeck">قيد المشاهدة</string>
<string name="upNext_pickAnother">اختيار غيره</string>
<string name="upNext_pickAnotherFailed">تعذّر اختيار عنصر آخر.</string>
<string name="upNext_playNow">التشغيل الآن</string>
<string name="upNext_playNow">تشغيل الحلقة التالية</string>

@coderabbitai coderabbitai Bot Nov 30, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Use content-neutral Arabic text for upNext_playNow.

The Arabic value تشغيل الحلقة التالية means "Play next episode". The TV next-up overlay can show a non-episode item (TvPlayerScreen.kt:3702-3703 checks !nextEpisode.isEpisode), and its play button uses the same key without a content-type guard (TvPlayerScreen.kt:3730). For that item, the button text names the wrong content type. The English source, Play Next Up, is content-neutral and does not have this problem.

Revise the Arabic translation so it does not name episodes. Apply the change in the translation source (silo-translations) and regenerate android-shared/src/androidMain/res/values-ar/strings_catalog.xml. Do not edit the generated catalog by hand.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not from this PR: these values are already on silo-translations main (from Silo-Server/silo-translations#163, which renamed the button to Play Next Up and describes it as starting the next episode). This branch only syncs them in with its own keys, and any later sync would bring them in too. A wording change belongs in the catalog.

🤖 Claude Code (claude-opus-5-5)

<plurals name="upNext_runtime">
<item quantity="zero">%1$d د</item>
<item quantity="one">%1$d د</item>
Expand Down
Loading
Loading