Skip to content

🗃️ Make archiving tables/applications a personal option#2476

Open
AndyScherzinger wants to merge 17 commits intomainfrom
feat/2125/personal-archiving-option
Open

🗃️ Make archiving tables/applications a personal option#2476
AndyScherzinger wants to merge 17 commits intomainfrom
feat/2125/personal-archiving-option

Conversation

@AndyScherzinger
Copy link
Copy Markdown
Member

@AndyScherzinger AndyScherzinger commented Apr 12, 2026

Archived categories Archive app Archive table Unarchive app Unarchive table
2026-04-12 15_33_25-Tables - Nextcloud — Mozilla Firefox 2026-04-12 15_34_51-Tables - Nextcloud — Mozilla Firefox 2026-04-12 15_34_35-Tables - Nextcloud — Mozilla Firefox 2026-04-12 15_34_05-Tables - Nextcloud — Mozilla Firefox 2026-04-12 15_33_50-Tables - Nextcloud — Mozilla Firefox

The original ticket #2125 defined tables and views, while this PR tacked tables and apps. Given a clear view on how archived views should get displayed this could be added as a follow-up PR to not make this PR grow in review-size and complexity.


Summary

  • This change replaces the existing single-user global archived flag on tables with a two-layer per-user model: an owner-level flag on the entity and a new tables_archive_user table that stores individual user overrides, so archive state is resolved per-user at read time. When an owner archives a table or application, it is automatically treated as archived for every user with access, but any of those users may override this for themselves; an owner unarchiving resets the state for everyone by clearing all per-user overrides.
  • The existing tables_tables.archived column is repurposed from a simple global toggle into the owner-level signal, and the database migration converts all currently-archived tables into owner-archived entries to preserve existing data without disruption.
  • Application (context) archiving is introduced as a completely new capability end-to-end: covering database schema, entity, service, API endpoints, routes, and frontend navigation - while table archiving is substantially reworked from a simple owner toggle into the full per-user propagation system.
  • A new ArchiveService centralizes all business logic for both resource types, four new API endpoints are split across ApiTablesController and ContextController following existing naming conventions, and the frontend gains archive/unarchive actions in both navigation item menus alongside a new collapsible "Archived applications" section mirroring the already-existing "Archived tables" section.

⚠️ Beware

The database migration only covers the owner and direct user shares, not groups, etc. since they can't be resolved directly via SQL (think teams/groups). So in these cases archived tables would resurface until manually archived by the respective user. Also there is no cleanup for teams/groups, if a user is taken out of a team, the archive meta-info would not get deleted. Only simple but confusing way around it would be to prevent archiving/unarchiving for tables/apps where a user is neither the owner nor a user-share receiver. Expensive alternative would be a housekeeping job checking all these archive bits periodically, but that also sounds expensive with little use. Else we would need to consume a team/group changes event and check if some cleanup is needed. WDYT?

@AndyScherzinger AndyScherzinger added enhancement New feature or request 2. developing Work in progress labels Apr 12, 2026
@AndyScherzinger AndyScherzinger changed the title Personal archiving option 🗃️ Make archiving tables/applications personal option Apr 12, 2026
* add secondary index on (node_type, node_id) for deleteAllForNode
* document why archived boolean columns are not indexed

AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* clean up per-user archive records when table or context is deleted

AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
…ransferred

AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger force-pushed the feat/2125/personal-archiving-option branch from c159543 to 73d304b Compare April 12, 2026 12:44
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
…tion

AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger force-pushed the feat/2125/personal-archiving-option branch 4 times, most recently from 008f4f3 to 0e2bbdc Compare April 12, 2026 15:34
@AndyScherzinger AndyScherzinger changed the title 🗃️ Make archiving tables/applications personal option 🗃️ Make archiving tables/applications a personal option Apr 12, 2026
AI-assistant: Claude Code 2.1.101 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger force-pushed the feat/2125/personal-archiving-option branch 2 times, most recently from d3fce3e to fd235a6 Compare April 12, 2026 18:56
@AndyScherzinger AndyScherzinger marked this pull request as ready for review April 12, 2026 19:36
@AndyScherzinger AndyScherzinger requested a review from enjeck as a code owner April 12, 2026 19:36
@AndyScherzinger AndyScherzinger requested a review from blizzz as a code owner April 12, 2026 19:36
@AndyScherzinger AndyScherzinger added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant