Skip to content

Fix not loading settings first page anymore#4365

Open
ildyria wants to merge 3 commits into
masterfrom
fix-settings-display-tab
Open

Fix not loading settings first page anymore#4365
ildyria wants to merge 3 commits into
masterfrom
fix-settings-display-tab

Conversation

@ildyria
Copy link
Copy Markdown
Member

@ildyria ildyria commented May 21, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed settings tab state initialization so the correct default tab is selected when none is specified.
  • Chores
    • Updated production image system packages to include an additional runtime library for improved stability.

Review Change Stack

@ildyria ildyria requested a review from a team as a code owner May 21, 2026 18:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

Settings.vue now treats undefined incoming tab values (from props or route params) as an empty string; the Dockerfile production-stage apt-get installs now include libgnutls30t64.

Changes

Settings component tab initialization

Layer / File(s) Summary
Tab initialization and route watcher
resources/js/views/admin/Settings.vue
tab ref now defaults props.tab to "" when props.tab is undefined, and the route-param watcher assigns "" when the watched newTab is undefined, ensuring tab comparisons use "" instead of undefined.

Docker production stage package

Layer / File(s) Summary
Add libgnutls30t64 to apt install
Dockerfile
libgnutls30t64 was added to the production-stage apt-get install package list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A tiny fix, a gentle tweak,
Tabs no longer hide or sneak.
Undefined becomes a string so mild,
Docker's parcel joins the pile.
Hop, deploy — the app is styled 🥕

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
resources/js/views/admin/Settings.vue (1)

223-226: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Keep tab fallback consistent in the route watcher.

tab is normalized to "" at initialization, but the watcher can set it back to undefined. That can break the tab === "" branch and regress first-page rendering when navigating to the route without a tab param.

Suggested fix
 watch(
 	() => route.params.tab,
 	(newTab, _oldTab) => {
-		tab.value = newTab as string | undefined;
+		tab.value = (newTab as string | undefined) ?? "";
 	},
 );

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7a76e206-6bc9-496e-9781-903287534392

📥 Commits

Reviewing files that changed from the base of the PR and between 6765004 and ccaa7da.

📒 Files selected for processing (1)
  • resources/js/views/admin/Settings.vue

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
resources/js/views/admin/Settings.vue (1)

225-225: ⚡ Quick win

Consider defensive handling for route parameter type safety.

The type assertion (newTab as string|undefined) doesn't account for all possible types from route.params.tab, which can be string | string[] | null | undefined in vue-router 5.x. While your router.push calls always use single strings (making an array unlikely), defensive code would be safer:

-		tab.value = (newTab as string|undefined) ?? '';
+		tab.value = (Array.isArray(newTab) ? newTab[0] : newTab) ?? '';

Additionally, TypeScript convention uses spaces around the union operator: string | undefined.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bdf98573-1008-4fdf-8e5b-0e111c6ed708

📥 Commits

Reviewing files that changed from the base of the PR and between ccaa7da and 8b667e4.

📒 Files selected for processing (2)
  • Dockerfile
  • resources/js/views/admin/Settings.vue

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant