Skip to content

[BUG] Manage Tags stops rendering when no tags exist #1016

Description

@marcomarcogd

Bug Description

Opening Settings → Feeds → Manage Tags can make the dialog flash briefly and stop rendering when the database contains no tags.

The empty database path currently returns a nil Go slice from GetTags, so /api/tags serializes the response as null. TagManagementModal.vue assigns that value directly and then evaluates tags.length, which is invalid for null.

Steps To Reproduce

  1. Start MrRSS with a fresh profile, or delete all tags so the tag table is empty.
  2. Open Settings.
  3. Select Feeds.
  4. Click Manage Tags.

Expected Behavior

The tag management dialog remains open and displays its empty state.

Actual Behavior

The dialog flashes briefly and then stops rendering because the frontend attempts to read length from the null API response.

Screenshots

Not included; the failure is deterministic with an empty tag table.

Environment

  • OS: Windows (original report); the response contract is platform-independent
  • MrRSS Version: upstream main at 334b1971960fab0e0fdb2f03e8d0db2aed397a41 / v1.3.26
  • Installation Method: source comparison against upstream main

Additional Context

There are two useful safeguards:

  • The database layer should return a non-nil empty slice so the HTTP response is [].
  • The modal should validate the HTTP status and response type so historical null responses and request failures do not tear down rendering.

No database schema or API route changes are required.

Logs

The Vue render path evaluates tags.length after /api/tags returned null.

Possible Solution

Initialize the tag result as an empty slice in GetTags, and make the management modal normalize non-array responses to [] while showing explicit loading, empty, error, and retry states.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions