fix: suggest edit only for non-Steam games, improve preset modal, improve steam reviews error handling, update changelog
This commit is contained in:
+18
-3
@@ -11,7 +11,7 @@ All notable changes to DeckyVault will be documented in this file.
|
|||||||
- Anti-cheat badges on games list and search results
|
- Anti-cheat badges on games list and search results
|
||||||
- Anti-cheat filter in games list
|
- Anti-cheat filter in games list
|
||||||
- Anti-cheat awareness step in benchmark submission wizard
|
- Anti-cheat awareness step in benchmark submission wizard
|
||||||
- Anti-cheat status shown per device in platform support section
|
- Anti-cheat is game-level property (not per-device)
|
||||||
|
|
||||||
#### Steam Reviews Integration
|
#### Steam Reviews Integration
|
||||||
- Steam review score and sentiment stored on game records
|
- Steam review score and sentiment stored on game records
|
||||||
@@ -26,6 +26,7 @@ All notable changes to DeckyVault will be documented in this file.
|
|||||||
- Manual override capability for admins/contributors
|
- Manual override capability for admins/contributors
|
||||||
- Color-coded playability badges across all game views
|
- Color-coded playability badges across all game views
|
||||||
- "Plays Great" quick-filter in games list
|
- "Plays Great" quick-filter in games list
|
||||||
|
- Auto-recalculates on benchmark submission and Steam sync
|
||||||
|
|
||||||
#### Games List Revamp
|
#### Games List Revamp
|
||||||
- FPS range filter (min/max)
|
- FPS range filter (min/max)
|
||||||
@@ -40,7 +41,7 @@ All notable changes to DeckyVault will be documented in this file.
|
|||||||
- Saved/bookmarked filter presets
|
- Saved/bookmarked filter presets
|
||||||
|
|
||||||
#### Community Suggestions
|
#### Community Suggestions
|
||||||
- "Suggest Edit" button on game details page
|
- "Suggest Edit" button on game details page (non-Steam games only)
|
||||||
- Community suggestion submission for editable fields
|
- Community suggestion submission for editable fields
|
||||||
- Moderation queue for pending suggestions
|
- Moderation queue for pending suggestions
|
||||||
- Approve/reject workflow with review notes
|
- Approve/reject workflow with review notes
|
||||||
@@ -60,16 +61,30 @@ All notable changes to DeckyVault will be documented in this file.
|
|||||||
- Report status tracking (open/reviewed/dismissed)
|
- Report status tracking (open/reviewed/dismissed)
|
||||||
- Verified badge on peer-reviewed benchmarks
|
- Verified badge on peer-reviewed benchmarks
|
||||||
|
|
||||||
|
#### Preset Detail Modal
|
||||||
|
- Added load times (SSD/SD) display
|
||||||
|
- Added battery life estimate display
|
||||||
|
- Added custom system indicator
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Manage page now shows dashboard by default instead of redirecting to users
|
- Manage page now shows dashboard by default instead of redirecting to users
|
||||||
- Games list now supports 12 filter dimensions and 7 sort options
|
- Games list now supports 12 filter dimensions and 7 sort options
|
||||||
- Game details page now shows anti-cheat, playability, and Steam reviews
|
- Game details page now shows anti-cheat, playability, and Steam reviews
|
||||||
|
- "Suggest Edit" only appears for non-Steam games (manual, GOG, Epic sources)
|
||||||
|
- Anti-cheat step in wizard now shows game-level status, not per-device
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Steam reviews component now handles missing/error data gracefully
|
||||||
|
- Anti-cheat badge no longer shows for games without anti-cheat
|
||||||
|
- Playability calculation only considers anti-cheat if game actually uses it
|
||||||
|
- API routes registered correctly (removed duplicate `/api` prefix)
|
||||||
|
- Dashboard and saved-filters routes now accessible
|
||||||
|
|
||||||
### Technical
|
### Technical
|
||||||
- Added `steamReviewScore`, `steamReviewSentiment`, `steamReviewCount` to games table
|
- Added `steamReviewScore`, `steamReviewSentiment`, `steamReviewCount` to games table
|
||||||
- Added `playabilityStatus`, `playabilityOverride`, `playabilityCalculatedAt` to games and gamePlatformSupport tables
|
- Added `playabilityStatus`, `playabilityOverride`, `playabilityCalculatedAt` to games and gamePlatformSupport tables
|
||||||
- Created `community_suggestions` table for moderation workflow
|
- Created `community_suggestions` table for moderation workflow
|
||||||
- Created `saved_filters` table for user filter presets
|
- Created `saved_filters` table for user filter presets
|
||||||
- Added playability auto-calculation engine
|
- Added playability auto-calculation engine with `recalculatePlayability()` export
|
||||||
- Added Steam reviews caching API
|
- Added Steam reviews caching API
|
||||||
- Added admin dashboard stats API
|
- Added admin dashboard stats API
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ interface PlatformSupport {
|
|||||||
|
|
||||||
interface Preset {
|
interface Preset {
|
||||||
id: string
|
id: string
|
||||||
|
gameId?: string
|
||||||
hardwareSlug: string
|
hardwareSlug: string
|
||||||
hardwareName: string
|
hardwareName: string
|
||||||
upvotes: number
|
upvotes: number
|
||||||
@@ -117,6 +118,10 @@ interface Preset {
|
|||||||
protonVersion: string | null
|
protonVersion: string | null
|
||||||
osVersion: string | null
|
osVersion: string | null
|
||||||
launchOptions: string | null
|
launchOptions: string | null
|
||||||
|
loadTimeSsd: number | null
|
||||||
|
loadTimeSd: number | null
|
||||||
|
estimatedBatteryMin: number | null
|
||||||
|
customSystem: boolean
|
||||||
userNotes: string | null
|
userNotes: string | null
|
||||||
userId: string
|
userId: string
|
||||||
userName: string | null
|
userName: string | null
|
||||||
@@ -638,17 +643,19 @@ export function GamePageClient({
|
|||||||
Add Benchmark
|
Add Benchmark
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
<CommunitySuggestionForm
|
{game.source !== "steam" && (
|
||||||
gameId={game.id}
|
<CommunitySuggestionForm
|
||||||
gameTitle={game.title}
|
gameId={game.id}
|
||||||
editableFields={[
|
gameTitle={game.title}
|
||||||
{ name: "title", label: "Title", currentValue: game.title },
|
editableFields={[
|
||||||
{ name: "description", label: "Description", currentValue: game.description || "" },
|
{ name: "title", label: "Title", currentValue: game.title },
|
||||||
{ name: "developer", label: "Developer", currentValue: game.developer || "" },
|
{ name: "description", label: "Description", currentValue: game.description || "" },
|
||||||
{ name: "publisher", label: "Publisher", currentValue: game.publisher || "" },
|
{ name: "developer", label: "Developer", currentValue: game.developer || "" },
|
||||||
{ name: "storeUrl", label: "Store URL", currentValue: game.storeUrl || "" },
|
{ name: "publisher", label: "Publisher", currentValue: game.publisher || "" },
|
||||||
]}
|
{ name: "storeUrl", label: "Store URL", currentValue: game.storeUrl || "" },
|
||||||
/>
|
]}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ interface Preset {
|
|||||||
protonVersion: string | null
|
protonVersion: string | null
|
||||||
osVersion: string | null
|
osVersion: string | null
|
||||||
launchOptions: string | null
|
launchOptions: string | null
|
||||||
|
loadTimeSsd: number | null
|
||||||
|
loadTimeSd: number | null
|
||||||
|
estimatedBatteryMin: number | null
|
||||||
|
customSystem: boolean
|
||||||
userNotes: string | null
|
userNotes: string | null
|
||||||
userId: string
|
userId: string
|
||||||
userName: string | null
|
userName: string | null
|
||||||
@@ -346,6 +350,18 @@ export function PresetDetailModal({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<MetaItem label="Launch Options" value={preset.launchOptions} />
|
<MetaItem label="Launch Options" value={preset.launchOptions} />
|
||||||
|
{preset.loadTimeSsd !== null && (
|
||||||
|
<MetaItem label="Load Time (SSD)" value={`${preset.loadTimeSsd}s`} />
|
||||||
|
)}
|
||||||
|
{preset.loadTimeSd !== null && (
|
||||||
|
<MetaItem label="Load Time (SD)" value={`${preset.loadTimeSd}s`} />
|
||||||
|
)}
|
||||||
|
{preset.estimatedBatteryMin !== null && (
|
||||||
|
<MetaItem label="Battery Life" value={`${preset.estimatedBatteryMin} min`} />
|
||||||
|
)}
|
||||||
|
{preset.customSystem && (
|
||||||
|
<MetaItem label="Custom System" value="Yes" />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="h-px bg-border" />
|
<div className="h-px bg-border" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { ThumbsUp, ThumbsDown, ExternalLink } from "lucide-react";
|
import { ThumbsUp, ThumbsDown, ExternalLink, MessageSquare } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
interface SteamReview {
|
interface SteamReview {
|
||||||
@@ -51,7 +51,10 @@ export function SteamReviews({ gameId, steamAppId, className }: SteamReviewsProp
|
|||||||
`/api/steam-reviews/${gameId}?offset=${newOffset}&limit=5&language=english`
|
`/api/steam-reviews/${gameId}?offset=${newOffset}&limit=5&language=english`
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!res.ok) throw new Error("Failed to load reviews");
|
if (!res.ok) {
|
||||||
|
const errData = await res.json().catch(() => null);
|
||||||
|
throw new Error(errData?.error || `HTTP ${res.status}`);
|
||||||
|
}
|
||||||
|
|
||||||
const result = await res.json();
|
const result = await res.json();
|
||||||
setData(result);
|
setData(result);
|
||||||
@@ -67,6 +70,7 @@ export function SteamReviews({ gameId, steamAppId, className }: SteamReviewsProp
|
|||||||
fetchReviews(0);
|
fetchReviews(0);
|
||||||
}, [gameId]);
|
}, [gameId]);
|
||||||
|
|
||||||
|
// Loading skeleton
|
||||||
if (loading && !data) {
|
if (loading && !data) {
|
||||||
return (
|
return (
|
||||||
<div className={cn("animate-pulse space-y-4", className)}>
|
<div className={cn("animate-pulse space-y-4", className)}>
|
||||||
@@ -80,15 +84,46 @@ export function SteamReviews({ gameId, steamAppId, className }: SteamReviewsProp
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Error state
|
||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return (
|
||||||
<div className={cn("rounded-lg border border-zinc-800 p-4", className)}>
|
<div className={cn("rounded-lg border border-zinc-800 p-4", className)}>
|
||||||
<p className="text-sm text-zinc-400">Failed to load Steam reviews</p>
|
<div className="flex items-center gap-2 text-zinc-400">
|
||||||
|
<MessageSquare className="h-4 w-4" />
|
||||||
|
<p className="text-sm">Steam reviews unavailable</p>
|
||||||
|
</div>
|
||||||
|
<p className="mt-1 text-xs text-zinc-500">{error}</p>
|
||||||
|
<a
|
||||||
|
href={`https://store.steampowered.com/app/${steamAppId}#app_reviews_hash`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="mt-2 inline-flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300"
|
||||||
|
>
|
||||||
|
View on Steam <ExternalLink className="h-3 w-3" />
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data?.query_summary) return null;
|
// No data or no summary
|
||||||
|
if (!data?.query_summary) {
|
||||||
|
return (
|
||||||
|
<div className={cn("rounded-lg border border-zinc-800 p-4", className)}>
|
||||||
|
<div className="flex items-center gap-2 text-zinc-400">
|
||||||
|
<MessageSquare className="h-4 w-4" />
|
||||||
|
<p className="text-sm">No Steam reviews available</p>
|
||||||
|
</div>
|
||||||
|
<a
|
||||||
|
href={`https://store.steampowered.com/app/${steamAppId}#app_reviews_hash`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="mt-2 inline-flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300"
|
||||||
|
>
|
||||||
|
View on Steam <ExternalLink className="h-3 w-3" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const { query_summary: summary } = data;
|
const { query_summary: summary } = data;
|
||||||
const totalReviews = summary.total_reviews ?? 0;
|
const totalReviews = summary.total_reviews ?? 0;
|
||||||
@@ -98,6 +133,26 @@ export function SteamReviews({ gameId, steamAppId, className }: SteamReviewsProp
|
|||||||
? Math.round((totalPositive / totalReviews) * 100)
|
? Math.round((totalPositive / totalReviews) * 100)
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
|
// No reviews case
|
||||||
|
if (totalReviews === 0) {
|
||||||
|
return (
|
||||||
|
<div className={cn("rounded-lg border border-zinc-800 p-4", className)}>
|
||||||
|
<div className="flex items-center gap-2 text-zinc-400">
|
||||||
|
<MessageSquare className="h-4 w-4" />
|
||||||
|
<p className="text-sm">No reviews yet</p>
|
||||||
|
</div>
|
||||||
|
<a
|
||||||
|
href={`https://store.steampowered.com/app/${steamAppId}#app_reviews_hash`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="mt-2 inline-flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300"
|
||||||
|
>
|
||||||
|
Be the first to review on Steam <ExternalLink className="h-3 w-3" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn("space-y-4", className)}>
|
<div className={cn("space-y-4", className)}>
|
||||||
{/* Summary header */}
|
{/* Summary header */}
|
||||||
@@ -155,22 +210,27 @@ export function SteamReviews({ gameId, steamAppId, className }: SteamReviewsProp
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Pagination */}
|
{/* Pagination */}
|
||||||
<div className="flex justify-between">
|
{totalReviews > 5 && (
|
||||||
<button
|
<div className="flex justify-between">
|
||||||
onClick={() => fetchReviews(Math.max(0, offset - 5))}
|
<button
|
||||||
disabled={offset === 0 || loading}
|
onClick={() => fetchReviews(Math.max(0, offset - 5))}
|
||||||
className="rounded-md border border-zinc-700 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50"
|
disabled={offset === 0 || loading}
|
||||||
>
|
className="rounded-md border border-zinc-700 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50"
|
||||||
Previous
|
>
|
||||||
</button>
|
Previous
|
||||||
<button
|
</button>
|
||||||
onClick={() => fetchReviews(offset + 5)}
|
<span className="text-xs text-zinc-500 self-center">
|
||||||
disabled={loading}
|
Showing {offset + 1}-{Math.min(offset + 5, totalReviews)} of {totalReviews}
|
||||||
className="rounded-md border border-zinc-700 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50"
|
</span>
|
||||||
>
|
<button
|
||||||
Next
|
onClick={() => fetchReviews(offset + 5)}
|
||||||
</button>
|
disabled={offset + 5 >= totalReviews || loading}
|
||||||
</div>
|
className="rounded-md border border-zinc-700 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50"
|
||||||
|
>
|
||||||
|
Next
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user