Skip to content

Commit 93d01a7

Browse files
committed
chore: update environment example and improve code formatting
- Updated the `.env.example` file to reflect the new default for `CLOUDFLARE_AI_TEXT_TO_SPEECH_MODEL`. - Improved formatting in various files for better readability, including consistent line breaks and indentation in TypeScript and Markdown files. - Adjusted error handling messages in the Vite configuration and other components for clarity.
1 parent 5a29760 commit 93d01a7

File tree

179 files changed

+1708
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1708
-940
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ CLOUDFLARE_AI_CALL_KENT_METADATA_MODEL=MOCK_CLOUDFLARE_AI_CALL_KENT_METADATA_MOD
115115

116116
# Feature: /calls/record (typed question -> AI TTS via Cloudflare Workers AI)
117117
# Mocked: yes (when MOCKS=true)
118-
# Optional (defaults to @cf/deepgram/aura-1)
118+
# Optional (defaults to @cf/deepgram/aura-2-en)
119119
CLOUDFLARE_AI_TEXT_TO_SPEECH_MODEL=MOCK_CLOUDFLARE_AI_TEXT_TO_SPEECH_MODEL
120120

121121
# Feature: /search/admin (semantic search manifests + ignore list)

.github/workflows/deployment.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ jobs:
8383
timeout-minutes: 15
8484
# Only run when we would actually deploy (keeps PRs fast).
8585
if:
86-
${{ github.ref == 'refs/heads/main' &&
87-
github.event_name == 'push' && needs.changes.outputs.DEPLOYABLE == 'true'
88-
}}
86+
${{ github.ref == 'refs/heads/main' && github.event_name == 'push' &&
87+
needs.changes.outputs.DEPLOYABLE == 'true' }}
8988
runs-on: ubuntu-latest
9089
steps:
9190
- name: ⬇️ Checkout repo

.github/workflows/index-semantic-youtube.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ jobs:
5454
# Optional: force-index specific videos. Can be set either as a
5555
# workflow_dispatch input or as a repository variable.
5656
YOUTUBE_VIDEO_IDS:
57-
${{ github.event_name == 'workflow_dispatch' && inputs.youtube_video_ids || vars.YOUTUBE_VIDEO_IDS }}
57+
${{ github.event_name == 'workflow_dispatch' &&
58+
inputs.youtube_video_ids || vars.YOUTUBE_VIDEO_IDS }}

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# AGENTS.md
22

3-
This file is included in full context for every agent conversation. Keep it
4-
tiny and stable.
3+
This file is included in full context for every agent conversation. Keep it tiny
4+
and stable.
55

66
## Editing policy
77

app/components/app-hotkeys.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,12 @@ function AppHotkeys() {
6262
setDialogOpen(false)
6363
}, [location.pathname])
6464

65-
useHotkey(
66-
hk.HOTKEY_TOGGLE_HOTKEYS_DIALOG,
67-
() => setDialogOpen((o) => !o),
68-
{
69-
ignoreInputs: true,
70-
preventDefault: true,
71-
requireReset: true,
72-
stopPropagation: true,
73-
},
74-
)
65+
useHotkey(hk.HOTKEY_TOGGLE_HOTKEYS_DIALOG, () => setDialogOpen((o) => !o), {
66+
ignoreInputs: true,
67+
preventDefault: true,
68+
requireReset: true,
69+
stopPropagation: true,
70+
})
7571

7672
React.useEffect(() => {
7773
const sequenceManager = getSequenceManager()
@@ -88,8 +84,13 @@ function AppHotkeys() {
8884
document.addEventListener('keydown', resetSequencesIfTyping, true)
8985
document.addEventListener('focusout', resetSequencesIfTyping, true)
9086

91-
const unregisterCallbacks = NAVIGATION_HOTKEY_ROUTES.map(({ sequence, path }) =>
92-
sequenceManager.register([...sequence], () => navigateToPath(path), navSequenceOptions),
87+
const unregisterCallbacks = NAVIGATION_HOTKEY_ROUTES.map(
88+
({ sequence, path }) =>
89+
sequenceManager.register(
90+
[...sequence],
91+
() => navigateToPath(path),
92+
navSequenceOptions,
93+
),
9394
)
9495

9596
return () => {
@@ -109,4 +110,3 @@ function AppHotkeys() {
109110
}
110111

111112
export { AppHotkeys }
112-

app/components/arrow-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { clsx } from 'clsx'
22
import { motion, useReducedMotion, type Variant } from 'framer-motion'
3-
import { Link, type LinkProps } from 'react-router';
3+
import { Link, type LinkProps } from 'react-router'
44
import {
55
useElementState,
66
type ElementState,

app/components/article-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { clsx } from 'clsx'
2-
import { Link } from 'react-router';
2+
import { Link } from 'react-router'
33
import { getImageBuilder, getImgProps } from '#app/images.tsx'
44
import { type MdxListItem, type Team } from '#app/types.ts'
55
import { getBannerAltProp, getBannerTitleProp } from '#app/utils/mdx.tsx'

app/components/calls/__tests__/submit-recording-form.test.tsx

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ describe('RecordingForm', () => {
4646
const createObjectURL = vi
4747
.spyOn(URL, 'createObjectURL')
4848
.mockReturnValue('blob:recording')
49-
const revokeObjectURL = vi.spyOn(URL, 'revokeObjectURL').mockImplementation(() => {})
49+
const revokeObjectURL = vi
50+
.spyOn(URL, 'revokeObjectURL')
51+
.mockImplementation(() => {})
5052
const errorSpy = vi.spyOn(console, 'error').mockImplementation(() => {})
5153

5254
try {
@@ -58,7 +60,9 @@ describe('RecordingForm', () => {
5860
target: { value: 'A valid title' },
5961
})
6062

61-
const submitButton = screen.getByRole('button', { name: 'Submit Recording' })
63+
const submitButton = screen.getByRole('button', {
64+
name: 'Submit Recording',
65+
})
6266
const form = container.querySelector('form')
6367
expect(form).not.toBeNull()
6468
fireEvent.submit(form as HTMLFormElement)
@@ -110,7 +114,9 @@ describe('RecordingForm', () => {
110114
) {
111115
if (eventName === 'loadend') {
112116
loadEndListener =
113-
typeof listener === 'function' ? () => listener(new Event('loadend')) : null
117+
typeof listener === 'function'
118+
? () => listener(new Event('loadend'))
119+
: null
114120
}
115121
}
116122
removeEventListener() {}
@@ -134,7 +140,9 @@ describe('RecordingForm', () => {
134140
const createObjectURL = vi
135141
.spyOn(URL, 'createObjectURL')
136142
.mockReturnValue('blob:recording')
137-
const revokeObjectURL = vi.spyOn(URL, 'revokeObjectURL').mockImplementation(() => {})
143+
const revokeObjectURL = vi
144+
.spyOn(URL, 'revokeObjectURL')
145+
.mockImplementation(() => {})
138146

139147
try {
140148
const { container } = render(
@@ -199,7 +207,9 @@ describe('RecordingForm', () => {
199207
) {
200208
if (eventName === 'loadend') {
201209
loadEndListener =
202-
typeof listener === 'function' ? () => listener(new Event('loadend')) : null
210+
typeof listener === 'function'
211+
? () => listener(new Event('loadend'))
212+
: null
203213
}
204214
}
205215
removeEventListener() {}
@@ -229,7 +239,9 @@ describe('RecordingForm', () => {
229239
const createObjectURL = vi
230240
.spyOn(URL, 'createObjectURL')
231241
.mockReturnValue('blob:recording')
232-
const revokeObjectURL = vi.spyOn(URL, 'revokeObjectURL').mockImplementation(() => {})
242+
const revokeObjectURL = vi
243+
.spyOn(URL, 'revokeObjectURL')
244+
.mockImplementation(() => {})
233245

234246
const initialData = {
235247
fields: {
@@ -287,7 +299,9 @@ describe('RecordingForm', () => {
287299
const createObjectURL = vi
288300
.spyOn(URL, 'createObjectURL')
289301
.mockReturnValue('blob:recording')
290-
const revokeObjectURL = vi.spyOn(URL, 'revokeObjectURL').mockImplementation(() => {})
302+
const revokeObjectURL = vi
303+
.spyOn(URL, 'revokeObjectURL')
304+
.mockImplementation(() => {})
291305

292306
try {
293307
const { container } = render(
@@ -303,7 +317,10 @@ describe('RecordingForm', () => {
303317
expect(screen.getByText('80 characters left')).toBeInTheDocument()
304318
const titleId = titleInput.getAttribute('id')
305319
expect(titleId).toBeTruthy()
306-
expect(titleInput).toHaveAttribute('aria-describedby', `${titleId}-countdown`)
320+
expect(titleInput).toHaveAttribute(
321+
'aria-describedby',
322+
`${titleId}-countdown`,
323+
)
307324

308325
fireEvent.change(titleInput, { target: { value: 'abcd' } })
309326
expect(screen.getByText('76 characters left')).toBeInTheDocument()
@@ -324,7 +341,9 @@ describe('RecordingForm', () => {
324341
fireEvent.change(titleInput, { target: { value: '' } })
325342
fireEvent.submit(form as HTMLFormElement)
326343
await screen.findByText('Title is required')
327-
expect(titleInput.getAttribute('aria-describedby')).toContain(`${titleId}-error`)
344+
expect(titleInput.getAttribute('aria-describedby')).toContain(
345+
`${titleId}-error`,
346+
)
328347
expect(titleInput.getAttribute('aria-describedby')).toContain(
329348
`${titleId}-countdown`,
330349
)

app/components/calls/episode-artwork-preview.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ export function EpisodeArtworkPreview({
9393
<div className="min-w-0 flex-1">
9494
<div className="flex items-start justify-between gap-4">
9595
<div className="min-w-0">
96-
<p className="text-primary text-lg font-medium">Episode artwork</p>
96+
<p className="text-primary text-lg font-medium">
97+
Episode artwork
98+
</p>
9799
<p className="mt-1 text-sm text-gray-600 dark:text-slate-400">
98100
{`By default we use your avatar from `}
99101
<a
@@ -135,7 +137,10 @@ export function EpisodeArtworkPreview({
135137
const wrapper = tooltipWrapperRef.current
136138
if (!wrapper) return
137139
const nextFocused = event.relatedTarget
138-
if (nextFocused instanceof Node && wrapper.contains(nextFocused)) {
140+
if (
141+
nextFocused instanceof Node &&
142+
wrapper.contains(nextFocused)
143+
) {
139144
return
140145
}
141146
setIsTooltipOpen(false)
@@ -150,15 +155,15 @@ export function EpisodeArtworkPreview({
150155
onKeyDown={(event) => {
151156
if (event.key === 'Escape') setIsTooltipOpen(false)
152157
}}
153-
className="text-primary inline-flex h-5 w-5 items-center justify-center rounded-full border border-gray-300 text-xs leading-none opacity-80 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-gray-600"
158+
className="text-primary inline-flex h-5 w-5 items-center justify-center rounded-full border border-gray-300 text-xs leading-none opacity-80 hover:opacity-100 focus:ring-2 focus:ring-blue-500 focus:outline-none dark:border-gray-600"
154159
>
155160
?
156161
</button>
157162
{isTooltipOpen ? (
158163
<span
159164
id={tooltipId}
160165
role="tooltip"
161-
className="absolute left-0 top-full z-20 mt-2 w-72 rounded-md bg-white p-3 text-sm text-gray-700 shadow-lg ring-1 ring-black/5 dark:bg-gray-900 dark:text-slate-200 dark:ring-white/10"
166+
className="absolute top-full left-0 z-20 mt-2 w-72 rounded-md bg-white p-3 text-sm text-gray-700 shadow-lg ring-1 ring-black/5 dark:bg-gray-900 dark:text-slate-200 dark:ring-white/10"
162167
>
163168
{tooltip}
164169
</span>
@@ -185,4 +190,3 @@ export function EpisodeArtworkPreview({
185190
</section>
186191
)
187192
}
188-

app/components/character-countdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export function CharacterCountdown({
1313
const remainingDisplay = Math.max(0, remaining)
1414
let className = 'text-gray-500 dark:text-slate-400'
1515
if (remaining <= 0) className = 'text-red-500'
16-
else if (remaining <= warnAt) className = 'text-yellow-600 dark:text-yellow-500'
16+
else if (remaining <= warnAt)
17+
className = 'text-yellow-600 dark:text-yellow-500'
1718

1819
return (
1920
<p

0 commit comments

Comments
 (0)