fix(ui): add loading state for translation status generated time#2589
fix(ui): add loading state for translation status generated time#2589cylewaitforit wants to merge 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughRemoved fallback timestamp behaviour from the translation status page: Changes
Possibly related issues
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/pages/translation-status.vue (1)
20-20: Remove the no-op hydration branch.
nuxt.isHydrated ? gat : gatnow returns the same value on both paths, so the computed can be collapsed anduseNuxtApp()can be dropped if it is no longer used elsewhere.♻️ Proposed simplification
-const nuxt = useNuxtApp() const router = useRouter() const canGoBack = useCanGoBack() const { fetchStatus, status } = useI18nStatus() @@ -const generatedAt = computed(() => { - const gat = status.value?.generatedAt - if (import.meta.client) { - return nuxt.isHydrated ? gat : gat - } - - return gat -}) +const generatedAt = computed(() => status.value?.generatedAt)Also applies to: 31-38
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/pages/translation-status.vue` at line 20, The conditional branch using nuxt.isHydrated that returns the same value on both sides is a no-op; remove the useNuxtApp() call and simplify the computed expression to return the single value directly. Locate the call to useNuxtApp() (nuxt) and the computed that does "nuxt.isHydrated ? gat : gat" and replace the computed with just the "gat" expression (and delete the useNuxtApp() import/call if it's unused elsewhere); apply the same collapse to the similar pattern in the other computed/blocks referenced (lines 31–38).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/pages/translation-status.vue`:
- Line 20: The conditional branch using nuxt.isHydrated that returns the same
value on both sides is a no-op; remove the useNuxtApp() call and simplify the
computed expression to return the single value directly. Locate the call to
useNuxtApp() (nuxt) and the computed that does "nuxt.isHydrated ? gat : gat" and
replace the computed with just the "gat" expression (and delete the useNuxtApp()
import/call if it's unused elsewhere); apply the same collapse to the similar
pattern in the other computed/blocks referenced (lines 31–38).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 511f4fb5-9003-47ce-bbb6-e9e38255f0f9
📒 Files selected for processing (1)
app/pages/translation-status.vue
a272ff5 to
2413d58
Compare
🔗 Linked issue
#2588
🧭 Context
Adds loading state when "generated at date" is not available.
📚 Description
Previously the page would show the current date and time before the data loaded. Not only is it incorrect information but would cause the visual regression tests to consistently need updating.