Skip to content

edit tags - #16672

Open
tobiasKaminsky wants to merge 11 commits into
masterfrom
editTags
Open

edit tags#16672
tobiasKaminsky wants to merge 11 commits into
masterfrom
editTags

Conversation

@tobiasKaminsky

Copy link
Copy Markdown
Member

Disclaimer: Claude AI

@github-actions

Copy link
Copy Markdown

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16672.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Comment thread app/src/main/java/com/nextcloud/ui/tags/TagManagementViewModel.kt Outdated
Comment thread app/src/main/java/com/nextcloud/ui/tags/TagManagementViewModel.kt Outdated
Comment thread app/src/main/java/com/nextcloud/ui/tags/TagListAdapter.kt Outdated
Comment thread app/src/main/java/com/nextcloud/ui/tags/TagListAdapter.kt Outdated
Comment thread app/src/main/java/com/nextcloud/ui/tags/TagManagementViewModel.kt Outdated
Comment thread app/src/main/java/com/nextcloud/ui/tags/TagManagementViewModel.kt Outdated
Comment thread app/src/main/java/com/nextcloud/ui/tags/TagManagementViewModel.kt Outdated
Comment thread app/src/main/java/com/nextcloud/ui/tags/TagManagementViewModel.kt Outdated
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/24389201000/artifacts/6423672148
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/24439364984/artifacts/6444218935
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/27810774168/artifacts/7743761678
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96 alperozturk96 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Crashing on slow instances due to a socket timeout while fetching tags. Also, when scrolling the adapter, items keep getting swapped or appear in the wrong positions.

Tested with 58b69fb

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/27814668793/artifacts/7745304336
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/27815183063/artifacts/7745542040
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/27817456441/artifacts/7746548761
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@tobiasKaminsky tobiasKaminsky added this to the Nextcloud App 35.0.0 milestone Aug 28, 2026
tobiasKaminsky and others added 11 commits August 28, 2026 11:09
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>

# Conflicts:
#	gradle/libs.versions.toml
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3232
Correctness5959
Dodgy code207207
Experimental11
Malicious code vulnerability22
Multithreaded correctness2525
Performance3939
Security1919
Total384384

@github-actions

Copy link
Copy Markdown

master-IT test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions

Copy link
Copy Markdown

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@daniele-verducci

Copy link
Copy Markdown
Contributor

Hello @tobiasKaminsky ,
I started testing it before looking at the code. These are the first observations:

Tags are ordered alphabetically, but not ignoring case:
image

If a lot of tags are added, they are all shown and it's not possible to scroll the view. Also it's not possible to remove them, as the edit button is outside the screen:
image

Adding too many tags causes an OOM that crashes the app:

Process: com.nextcloud.client, PID: 25653
java.lang.OutOfMemoryError: Failed to allocate a 152 byte allocation with 417312 free bytes and 407KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
	at android.database.CursorWindow.nativeGetString(Native Method)
	at android.database.CursorWindow.getString(CursorWindow.java:481)
	at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:56)
	at androidx.sqlite.driver.SupportSQLiteStatement$RowSQLiteStatement.getText(SupportSQLiteStatement.android.kt:370)
	at com.nextcloud.client.database.dao.FileDao_Impl.getFolderContentSuspended$lambda$0(FileDao_Impl.kt:3744)
	at com.nextcloud.client.database.dao.FileDao_Impl$$ExternalSyntheticLambda9.invoke(D8$$SyntheticClass:0)
	at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invokeSuspend(DBUtil.kt:173)
	at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invoke(DBUtil.kt:8)
	at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invoke(DBUtil.kt:4)
	at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invokeSuspend(PassthroughConnectionPool.kt:59)
	at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invoke(PassthroughConnectionPool.kt:8)
	at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invoke(PassthroughConnectionPool.kt:4)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatched(Undispatched.kt:66)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:43)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:497)
	at kotlinx.coroutines.BuildersKt.withContext(dex-id-03f04fde4296a540e0d44206e06ba382e35e4c0d:1)
	at androidx.room.coroutines.PassthroughConnectionPool.useConnection(PassthroughConnectionPool.kt:59)
	at androidx.room.RoomConnectionManager.useConnection(RoomConnectionManager.android.kt:138)
	at androidx.room.RoomDatabase.useConnection(RoomDatabase.android.kt:619)
	at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$$inlined$compatCoroutineExecute$DBUtil__DBUtil_androidKt$1.invokeSuspend(DBUtil.android.kt:261)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1100)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:1571)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@6e4f404, Dispatchers.IO]

This happened while loading the files list. FileDao_Impl.kt:3744 contains _tmpTags = _stmt.getText(_columnIndexOfTags)

Sometimes the OOM does not crash the app, but leaves it in inconsistent state: the file is displayed without any tags and is not possible to add any (it "unchecks" automatically after a while logging "cannot assign tag" in ADB):
Screen_recording_20260828_114913.webm

I'll now go on checking the code.

@daniele-verducci

Copy link
Copy Markdown
Contributor

Finished reviewing the code, added a couple of very tiny remarks, but nothing important. Seems sound to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants