-
Notifications
You must be signed in to change notification settings - Fork 0
batch(baseball): 22 fixes — single-deploy batch #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 25 commits
7115aed
5ed719f
a7057a9
51f9991
2c0b20c
318b656
892e087
f330316
0b01ee5
35ef654
2e53f2b
5258b24
c555544
828b357
7352c75
80258cf
48d739c
84418b9
e10baba
627d164
73db16b
fcc98b7
dc077de
826bebc
4923bd6
3a42b03
90c1f04
78b0f1f
15ffb84
99f45b3
1ee1c34
c9ce8e5
4dbcc30
7c5d88c
7df4eaf
7a86ad3
74d1ba8
457f564
987cce5
e7c341a
f7ef4dc
7812a58
2fff8f6
8423a6f
e3efc89
fda310a
be249e2
79b0d14
7015c84
7972450
aad7f93
d871880
d590ad6
275c57b
06e925f
4f98e63
99de969
0640faa
9bc6cce
cc495ee
a82cafb
944c5e9
8cb8897
fd53e23
ab64f33
d12e3df
a17d3f7
c169d05
100975e
b845e0d
9c39499
50e4c03
6c22ba9
73cee76
f1391ec
0da63d2
71bc996
cabc0f9
3f24a81
3d2fc72
fbccfd6
a296a37
7e689fa
6cdc375
2a5d74c
8d88990
5ead67e
0393b0d
28ed3a8
7583989
6febf9d
a12d6ad
922f55f
c9620a5
f38e96b
5d56fc3
001461f
1bc6d7c
13343b7
d01010a
0f62f50
8661582
c4c5a42
af4e82f
7af9a10
0c8d6f4
18710c9
f3de005
e1ef057
3c1108d
fd54139
ebf7bfd
5a7ec8a
3129f50
8a7467a
7a27564
569da17
d6cce0d
ccc08ed
193806d
9947cf6
9353992
f247be5
51dca83
af21094
f336165
ea9f3c0
34756f0
2c5c83b
04582d1
7fabd73
87020b2
d60d73e
8b044ac
91eb5d8
74878ac
9dd1ca1
d384d8a
bcc4eee
cf6a247
d45b892
7e0d98d
a78d43d
13bf6bd
749278e
ad25e8c
8119cdf
efe0803
6a1e1f6
3476c36
8ffe8f6
723d6c4
28338cd
5b4fd79
a3ad99c
d876af7
810ba0f
eca2b6b
200ea2f
95e5ba9
9ea08d9
e3142d3
6674810
ed3cf89
6c5a8ee
b78e77d
ff61a63
edeef81
36ec31a
89e0be6
f1f3656
d8a65dc
3060bbe
2058ea6
0a59653
d9bfef6
f36c558
ca0647c
9f3e434
b79e8d1
b29e4f6
4532046
3526855
11fd8df
488372d
cb164a4
b203b06
47cfa4d
68944a3
df2a297
58b03fe
bbd2cb3
5f60213
98dc22d
5093865
a581444
994ade9
9bda911
34a5f41
bee4966
80f22c8
43f519a
a226db0
12ca2fd
604b8ac
733b031
201fe10
c1a4833
0d68727
3789fa6
edf17e0
c249058
ca34951
8a52013
76cfd80
b28e835
2e74697
a64dc38
c9cd21b
c4bb04b
2d3a0e5
423c086
d643a4e
ef3bb88
631bc0e
d7872d6
ab5d9b0
504367b
0b1e247
263d6d2
dd759fa
d499eeb
ace5c30
5739d89
0b21b70
5b8b876
23fd455
03c6e00
e53e5ea
abe1a26
fd37197
e7f416b
a2433ea
66a6b77
cbd691c
ade9c22
97c6524
5726a1a
ce71cd9
d729630
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -39,6 +39,7 @@ import { | |||||
| IconCheck, | ||||||
| } from '@/components/icons'; | ||||||
| import type { BaseballPlayerStats, BaseballPlayerAggregates, BaseballCoachInsight } from '@/lib/types'; | ||||||
| import type { BaseballNoteScope } from '@/lib/types/baseball-extended'; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Deep import bypasses the
-import type { BaseballNoteScope } from '`@/lib/types/baseball-extended`';
+import type { BaseballCoachInsight, BaseballNoteScope, BaseballPlayerAggregates, BaseballPlayerStats } from '`@/lib/types`';If 🔧 Verify the type is re-exported from the barrel#!/bin/bash
rg -n "BaseballNoteScope" src/lib/types/index.ts src/lib/types/baseball-extended.ts📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Path instructions |
||||||
| import type { SnapshotHeader } from '@/lib/baseball/read-models/player-snapshot-cards'; | ||||||
| import type { TimelineEventView } from '@/lib/baseball/read-models/timeline'; | ||||||
| import { PlayerInsightsPanel } from './PlayerInsightsPanel'; | ||||||
|
|
@@ -47,6 +48,7 @@ import { ProfileTimeline } from './ProfileTimeline'; | |||||
| import { SnapshotHeaderBand } from './snapshot-cards'; | ||||||
| import { Button, IconButton } from '@/components/ui/button'; | ||||||
| import { Textarea } from '@/components/ui/textarea'; | ||||||
| import { NativeSelect } from '@/components/ui/select'; | ||||||
| import { PlayerPerformanceTab } from '@/components/lifting/performance/PlayerPerformanceTab'; | ||||||
| import { createCoachNote } from '@/app/baseball/actions/coach-notes'; | ||||||
|
|
||||||
|
|
@@ -269,6 +271,9 @@ export function PlayerProfileClient({ | |||||
| const [activeTab, setActiveTab] = useState<MainTab>('overview'); | ||||||
| // ── Note add form state ──────────────────────────────────────────────────── | ||||||
| const [noteBody, setNoteBody] = useState(''); | ||||||
| // Both scopes are authorable by any staff member (canAuthorScope), so no | ||||||
| // capability data is needed to offer this choice; the server still enforces it. | ||||||
| const [noteScope, setNoteScope] = useState<BaseballNoteScope>('staff_public'); | ||||||
| const [noteError, setNoteError] = useState<string | null>(null); | ||||||
| const [noteSuccess, setNoteSuccess] = useState(false); | ||||||
| const [isPendingNote, startNoteTransition] = useTransition(); | ||||||
|
|
@@ -409,7 +414,7 @@ export function PlayerProfileClient({ | |||||
| setNoteError(null); | ||||||
| setNoteSuccess(false); | ||||||
| startNoteTransition(async () => { | ||||||
| const result = await createCoachNote({ playerId: player.id, body, scope: 'staff_public' }); | ||||||
| const result = await createCoachNote({ playerId: player.id, body, scope: noteScope }); | ||||||
| if (result.success) { | ||||||
| setNoteBody(''); | ||||||
| setNoteSuccess(true); | ||||||
|
|
@@ -1376,6 +1381,28 @@ export function PlayerProfileClient({ | |||||
| rows={4} | ||||||
| disabled={isPendingNote} | ||||||
| /> | ||||||
| {/* Visibility scope — staff-only vs. shared with the player. A | ||||||
| player_visible note surfaces on the player's Today + timeline. */} | ||||||
| <div className="mt-3"> | ||||||
| <label htmlFor="note-visibility" className="block text-xs font-medium text-warm-500 mb-1.5"> | ||||||
| Visibility | ||||||
| </label> | ||||||
| <NativeSelect | ||||||
| id="note-visibility" | ||||||
| value={noteScope} | ||||||
| onChange={(e) => setNoteScope(e.target.value as BaseballNoteScope)} | ||||||
| disabled={isPendingNote} | ||||||
| className="w-56 text-sm" | ||||||
| > | ||||||
| <option value="staff_public">Staff only</option> | ||||||
| <option value="player_visible">Visible to player</option> | ||||||
| </NativeSelect> | ||||||
| <p className="text-xs text-warm-400 mt-1.5"> | ||||||
| {noteScope === 'player_visible' | ||||||
| ? 'The player will see this note on their Today and timeline.' | ||||||
| : 'Only staff can see this note.'} | ||||||
| </p> | ||||||
| </div> | ||||||
| <div className="flex items-center justify-between mt-3"> | ||||||
| <div> | ||||||
| {noteError && ( | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Postgame prioritems db error ignored
🐞 Bug☼ ReliabilityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools