Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/components/ChapterSkeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
*/

import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, type ViewStyle, type DimensionValue } from 'react-native';
import Animated, {
useSharedValue,
useAnimatedStyle,
Expand All@@ -17,15 +17,15 @@ import Animated, {
import { base, spacing, radii } from '../theme';

function Bone({ width, height = 14, style }: {
width: number | string;
width: DimensionValue;
height?: number;
style?: any;
style?: ViewStyle;
}) {
return (
<View
style={[
{
width: width as any,
width,
height,
backgroundColor: base.bgSurface,
borderRadius: radii.sm,
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/ScholarInfoSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import { View, Text, TouchableOpacity, Modal, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getScholar } from '../db/content';
import { getScholarColor, base, spacing, radii, fontFamily } from '../theme';
import type { Scholar } from '../types';
import type { Scholar, ScholarBio } from '../types';
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -20,7 +20,7 @@ interface Props {

export function ScholarInfoSheet({ visible, onClose, scholarId, onGoToFullBio }: Props) {
const [scholar, setScholar] = useState<Scholar | null>(null);
const [bio, setBio] = useState<any>(null);
const [bio, setBio] = useState<ScholarBio | null>(null);

useEffect(() => {
if (!scholarId || !visible) return;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/SectionBlock.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { View, StyleSheet } from 'react-native';
import { SectionHeader } from './SectionHeader';
import { VerseBlock } from './VerseBlock';
import { base, spacing } from '../theme';
import type { Section, SectionPanel, Verse, VHLGroup } from '../types';
import type { Section, SectionPanel, Verse, VHLGroup, ParsedRef } from '../types';

interface Props {
section: Section;
Expand All@@ -24,7 +24,7 @@ interface Props {
fontSize?: number;
onPanelToggle: (sectionId: string, panelType: string) => void;
onNotePress?: (verseNum: number) => void;
onRefPress?: (ref: any) => void;
onRefPress?: (ref: ParsedRef) => void;
/** Render prop for button row — injected by parent to avoid circular deps */
renderButtonRow?: (panels: SectionPanel[], sectionId: string) => React.ReactNode;
/** Render prop for active panel content */
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/ThreadViewerSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,12 @@ import { getCrossRefThread } from '../db/content';
import { BadgeChip } from './BadgeChip';
import { base, spacing, radii, fontFamily } from '../theme';
import type { CrossRefThread } from '../types';

interface CrossRefStep {
ref: string;
note?: string;
text?: string;
}
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -24,7 +30,7 @@ interface Props {

export function ThreadViewerSheet({ visible, onClose, threadId, currentBookId, currentChapter, onGoToRef }: Props) {
const [thread, setThread] = useState<CrossRefThread | null>(null);
const [steps, setSteps] = useState<any[]>([]);
const [steps, setSteps] = useState<CrossRefStep[]>([]);

useEffect(() => {
if (!threadId || !visible) return;
Expand Down
13 changes: 7 additions & 6 deletions app/src/components/panels/DebatePanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { DebateEntry } from '../../types';

interface Props { entries: any[]; onScholarPress?: (scholarId: string) => void; }
interface Props { entries: DebateEntry[]; onScholarPress?: (scholarId: string) => void; }

export function DebatePanel({ entries, onScholarPress }: Props) {
const colors = getPanelColors('debate');
Expand All@@ -13,17 +14,17 @@ export function DebatePanel({ entries, onScholarPress }: Props) {
{entries.map((d, i) => {
// Handle both shapes: { topic, positions: [{scholar, position}] }
// and legacy: { title, positions: [{name, proponents, argument}] }
const heading = d.topic ?? d.title ?? 'Debate';
const positions: any[] = d.positions ?? [];
const heading = d.topic ?? 'Debate';
const positions = d.positions ?? [];

return (
<View key={i} style={{ gap: spacing.sm }}>
<Text style={{ color: colors.accent, fontFamily: fontFamily.displayMedium, fontSize: 13 }}>
{heading}
</Text>
{positions.map((p: any, j: number) => {
const label = p.scholar ?? p.name ?? 'Scholar';
const body = p.position ?? p.argument ?? p.proponents ?? '';
{positions.map((p, j: number) => {
const label = p.scholar ?? 'Scholar';
const body = p.position ?? '';
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy debate position keys when rendering

The renderer now reads only p.scholar/p.position, but existing debate data uses legacy position fields like name, argument, and proponents (for example content/proverbs/2.json). Since there is no runtime normalization in the app for these keys, debate rows lose their labels/body text and degrade to placeholder output, which removes substantive chapter content for users.

Useful? React with 👍 / 👎.


return (
<View key={j} style={{ gap: 4, paddingLeft: spacing.sm }}>
Expand Down
12 changes: 5 additions & 7 deletions app/src/components/panels/ReceptionPanel.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@ import React from 'react';
import { View, Text } from 'react-native';
import { TappableReference } from '../TappableReference';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { ParsedRef } from '../../types';
import type { ParsedRef, RecEntry } from '../../types';

interface Props { entries: any[]; onRefPress?: (ref: ParsedRef) => void; }
interface Props { entries: RecEntry[]; onRefPress?: (ref: ParsedRef) => void; }

export function ReceptionPanel({ entries, onRefPress }: Props) {
const colors = getPanelColors('rec');
Expand All@@ -18,11 +18,9 @@ export function ReceptionPanel({ entries, onRefPress }: Props) {

return (
<View style={{ gap: spacing.md }}>
{entries.map((e: any, i: number) => {
// Handle both shapes: { title, quote, note }
// and legacy: { who, text }
const heading = e.title ?? e.who ?? '';
const body = e.quote ?? e.text ?? '';
{entries.map((e, i: number) => {
const heading = e.title ?? '';
const body = e.quote ?? '';
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy who/text keys in ReceptionPanel

This change drops support for the existing legacy reception shape (who/text) and only reads title/quote, so chapters with legacy panel data now render blank entries instead of content. The repository still contains legacy rec entries (for example content/proverbs/2.json), and the content normalizer leaves dict-form rec entries as-is (_tools/shared.py), so this is a real runtime regression for current data rather than just a type-only cleanup.

Useful? React with 👍 / 👎.

const note = e.note ?? '';

return (
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/panels/TranslationPanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { TransPanel } from '../../types';

interface TransRow {
verse_ref?: string;
translations: { version: string; text: string }[];
}

interface Props { data: any; }
interface Props { data: string | TransPanel; }

/**
* Parse legacy HTML table format: <tr><td class="t-label">NIV</td><td>...</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion app/src/hooks/useBookIntro.ts
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { getBookIntro } from '../db/content';
import { safeParse } from '../utils/logger';
import type { ParsedBookIntro } from '../types';

export function useBookIntro(bookId: string | null) {
const [intro, setIntro] = useState<any>(null);
const [intro, setIntro] = useState<ParsedBookIntro | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/navigation/types.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,9 +30,9 @@ export type HomeStackParamList = {

export type ExploreStackParamList = {
ExploreMenu: undefined;
GenealogyTree: undefined;
GenealogyTree: { personId?: string } | undefined;
PersonDetail: { personId: string };
Map: { storyId?: string };
Map: { storyId?: string; placeId?: string };
Timeline: { eventId?: string };
WordStudyBrowse: undefined;
WordStudyDetail: { wordId: string };
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/AllNotesScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Search, X, Plus, Folder, Tag, FileText } from 'lucide-react-native';
import { ScreenHeader } from '../components/ScreenHeader';
import {
Expand DownExpand Up@@ -64,7 +65,7 @@ function parseTags(json: string): string[] {
}

export default function AllNotesScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'AllNotes'>>();
const [activeTab, setActiveTab] = useState<TabKey>('all');

// All tab state
Expand Down
7 changes: 4 additions & 3 deletions app/src/screens/BookIntroScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { BookIntroSection, BookIntroOutlineItem, BookIntroPlanItem } from '../types';
import { useBookIntro } from '../hooks/useBookIntro';
import { ScreenHeader } from '../components/ScreenHeader';
import { LoadingSkeleton } from '../components/LoadingSkeleton';
Expand DownExpand Up@@ -72,7 +73,7 @@ export default function BookIntroScreen() {
)}

{/* Sections */}
{intro.sections?.map((section: any, i: number) => (
{intro.sections?.map((section: BookIntroSection, i: number) => (
<View key={i} style={styles.section}>
{section.heading && (
<Text style={styles.sectionHeading}>{section.heading}</Text>
Expand All@@ -88,7 +89,7 @@ export default function BookIntroScreen() {
{/* Outline (structured list with label + chapters + note) */}
{section.outline && Array.isArray(section.outline) && (
<View style={styles.outlineBlock}>
{section.outline.map((item: any, j: number) => (
{section.outline.map((item: BookIntroOutlineItem, j: number) => (
<View key={j} style={styles.outlineItem}>
<View style={styles.outlineRow}>
<Text style={styles.outlineLabel}>{item.label}</Text>
Expand DownExpand Up@@ -118,7 +119,7 @@ export default function BookIntroScreen() {
{/* Reading Plan (ref + label list) */}
{section.plan && Array.isArray(section.plan) && (
<View style={styles.planBlock}>
{section.plan.map((item: any, j: number) => (
{section.plan.map((item: BookIntroPlanItem, j: number) => (
<View key={j} style={styles.planItem}>
<Text style={styles.planRef}>{item.ref}</Text>
<Text style={styles.planLabel}>{item.label}</Text>
Expand Down
5 changes: 3 additions & 2 deletions app/src/screens/BookListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import React, { useState, useMemo, useRef } from 'react';
import { View, Text, TouchableOpacity, SectionList, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { useBooks, type BookWithProgress } from '../hooks/useBooks';
import { useSettingsStore } from '../stores';
Expand All@@ -36,9 +37,9 @@ const NT_GROUPS = [
];

export default function BookListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'BookList'>>();
const scrollRef = useRef<FlatList>(null);
useScrollToTop(scrollRef as any);
useScrollToTop(scrollRef);

const { books } = useBooks();
const mode = useSettingsStore((s) => s.bookListMode);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/BookmarkListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,15 @@ import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, Alert, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getBookmarks, removeBookmark } from '../db/user';
import { parseVerseRef, displayRef } from '../utils/verseRef';
import { ScreenHeader } from '../components/ScreenHeader';
import { base, spacing, fontFamily } from '../theme';
import type { Bookmark } from '../types';

export default function BookmarkListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'Bookmarks'>>();
const [bookmarks, setBookmarks] = useState<Bookmark[]>([]);

const reload = () => getBookmarks().then(setBookmarks);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ChapterScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import { View, ScrollView, LayoutAnimation, Platform, UIManager, StyleSheet, type NativeSyntheticEvent, type NativeScrollEvent, type GestureResponderEvent } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { Book } from '../types';

import { useChapterData } from '../hooks/useChapterData';
import { useNotedVerses } from '../hooks/useNotedVerses';
Expand DownExpand Up@@ -58,7 +59,7 @@ export default function ChapterScreen() {
const scrollRef = useRef<ScrollView>(null);
const sectionYMap = useRef<Record<string, number>>({});
const btnRowYMap = useRef<Record<string, number>>({});
const [bookData, setBookData] = React.useState<any>(null);
const [bookData, setBookData] = React.useState<Book | null>(null);
const [scrollProgress, setScrollProgress] = useState(0);

// Scroll progress tracking
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ExploreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { base, spacing, radii, fontFamily } from '../theme';

Expand DownExpand Up@@ -70,7 +71,7 @@ const GRID_FEATURES: Feature[] = [
];

export default function ExploreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Explore', 'ExploreMenu'>>();
const scrollRef = useRef<ScrollView>(null);
useScrollToTop(scrollRef);

Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/GenealogyTreeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,12 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';
import { base, spacing } from '../theme';
import type { Person } from '../types';
import type { TreePerson } from '../utils/treeBuilder';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';

export default function GenealogyTreeScreen({ route, navigation }: any) {
export default function GenealogyTreeScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'GenealogyTree'>;
navigation: ScreenNavProp<'Explore', 'GenealogyTree'>;
}) {
useLandscapeUnlock();
const initialPersonId = route?.params?.personId;
const { people, isLoading } = usePeople();
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/HomeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import React, { useState, useCallback, useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, RefreshControl, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { ArrowRight } from 'lucide-react-native';
import { useHomeData } from '../hooks/useHomeData';
Expand All@@ -22,7 +23,7 @@ import { base, spacing, radii, fontFamily } from '../theme';
const TOTAL_BIBLE_CHAPTERS = 1189;

export default function HomeScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Home', 'HomeMain'>>();
const { greeting, subtitle, verse, recentChapters, readingStats, isLoading, refresh } = useHomeData();
const [refreshing, setRefreshing] = useState(false);
const scrollRef = useRef<ScrollView>(null);
Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/MapScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';

import { base, spacing } from '../theme';
import type { MapStory, Place } from '../types';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import { logger } from '../utils/logger';

const INITIAL_REGION = {
Expand All@@ -44,7 +45,10 @@ const INITIAL_REGION = {
longitudeDelta: 30,
};

export default function MapScreen({ route, navigation }: any) {
export default function MapScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'Map'>;
navigation: ScreenNavProp<'Explore', 'Map'>;
}) {
useLandscapeUnlock();
const initialStoryId = route?.params?.storyId;
const initialPlaceId = route?.params?.placeId;
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/MoreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Bookmark, Clock, Calendar, Settings, ArrowRight, StickyNote } from 'lucide-react-native';
import { base, spacing, radii, MIN_TOUCH_TARGET, fontFamily } from '../theme';

Expand All@@ -27,7 +28,7 @@ const MENU_ITEMS: MenuItem[] = [
];

export default function MoreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'MoreMenu'>>();

return (
<SafeAreaView style={styles.container}>
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ParallelPassageScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { View, Text, TouchableOpacity, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getSynopticEntries } from '../db/content';
import { resolveVerseText, parseReference } from '../utils/verseResolver';
import { useSettingsStore } from '../stores';
Expand All@@ -24,7 +25,7 @@ const CATEGORY_LABELS: Record<string, string> = {
};

export default function ParallelPassageScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'ParallelPassage'>>();
const [entries, setEntries] = useState<SynopticEntry[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [catFilter, setCatFilter] = useState<string>('all');
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/components/ChapterSkeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
*/

import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, type ViewStyle, type DimensionValue } from 'react-native';
import Animated, {
useSharedValue,
useAnimatedStyle,
Expand All@@ -17,15 +17,15 @@ import Animated, {
import { base, spacing, radii } from '../theme';

function Bone({ width, height = 14, style }: {
width: number | string;
width: DimensionValue;
height?: number;
style?: any;
style?: ViewStyle;
}) {
return (
<View
style={[
{
width: width as any,
width,
height,
backgroundColor: base.bgSurface,
borderRadius: radii.sm,
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/ScholarInfoSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import { View, Text, TouchableOpacity, Modal, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getScholar } from '../db/content';
import { getScholarColor, base, spacing, radii, fontFamily } from '../theme';
import type { Scholar } from '../types';
import type { Scholar, ScholarBio } from '../types';
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -20,7 +20,7 @@ interface Props {

export function ScholarInfoSheet({ visible, onClose, scholarId, onGoToFullBio }: Props) {
const [scholar, setScholar] = useState<Scholar | null>(null);
const [bio, setBio] = useState<any>(null);
const [bio, setBio] = useState<ScholarBio | null>(null);

useEffect(() => {
if (!scholarId || !visible) return;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/SectionBlock.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { View, StyleSheet } from 'react-native';
import { SectionHeader } from './SectionHeader';
import { VerseBlock } from './VerseBlock';
import { base, spacing } from '../theme';
import type { Section, SectionPanel, Verse, VHLGroup } from '../types';
import type { Section, SectionPanel, Verse, VHLGroup, ParsedRef } from '../types';

interface Props {
section: Section;
Expand All@@ -24,7 +24,7 @@ interface Props {
fontSize?: number;
onPanelToggle: (sectionId: string, panelType: string) => void;
onNotePress?: (verseNum: number) => void;
onRefPress?: (ref: any) => void;
onRefPress?: (ref: ParsedRef) => void;
/** Render prop for button row — injected by parent to avoid circular deps */
renderButtonRow?: (panels: SectionPanel[], sectionId: string) => React.ReactNode;
/** Render prop for active panel content */
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/ThreadViewerSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,12 @@ import { getCrossRefThread } from '../db/content';
import { BadgeChip } from './BadgeChip';
import { base, spacing, radii, fontFamily } from '../theme';
import type { CrossRefThread } from '../types';

interface CrossRefStep {
ref: string;
note?: string;
text?: string;
}
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -24,7 +30,7 @@ interface Props {

export function ThreadViewerSheet({ visible, onClose, threadId, currentBookId, currentChapter, onGoToRef }: Props) {
const [thread, setThread] = useState<CrossRefThread | null>(null);
const [steps, setSteps] = useState<any[]>([]);
const [steps, setSteps] = useState<CrossRefStep[]>([]);

useEffect(() => {
if (!threadId || !visible) return;
Expand Down
13 changes: 7 additions & 6 deletions app/src/components/panels/DebatePanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { DebateEntry } from '../../types';

interface Props { entries: any[]; onScholarPress?: (scholarId: string) => void; }
interface Props { entries: DebateEntry[]; onScholarPress?: (scholarId: string) => void; }

export function DebatePanel({ entries, onScholarPress }: Props) {
const colors = getPanelColors('debate');
Expand All@@ -13,17 +14,17 @@ export function DebatePanel({ entries, onScholarPress }: Props) {
{entries.map((d, i) => {
// Handle both shapes: { topic, positions: [{scholar, position}] }
// and legacy: { title, positions: [{name, proponents, argument}] }
const heading = d.topic ?? d.title ?? 'Debate';
const positions: any[] = d.positions ?? [];
const heading = d.topic ?? 'Debate';
const positions = d.positions ?? [];

return (
<View key={i} style={{ gap: spacing.sm }}>
<Text style={{ color: colors.accent, fontFamily: fontFamily.displayMedium, fontSize: 13 }}>
{heading}
</Text>
{positions.map((p: any, j: number) => {
const label = p.scholar ?? p.name ?? 'Scholar';
const body = p.position ?? p.argument ?? p.proponents ?? '';
{positions.map((p, j: number) => {
const label = p.scholar ?? 'Scholar';
const body = p.position ?? '';
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy debate position keys when rendering

The renderer now reads only p.scholar/p.position, but existing debate data uses legacy position fields like name, argument, and proponents (for example content/proverbs/2.json). Since there is no runtime normalization in the app for these keys, debate rows lose their labels/body text and degrade to placeholder output, which removes substantive chapter content for users.

Useful? React with 👍 / 👎.


return (
<View key={j} style={{ gap: 4, paddingLeft: spacing.sm }}>
Expand Down
12 changes: 5 additions & 7 deletions app/src/components/panels/ReceptionPanel.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@ import React from 'react';
import { View, Text } from 'react-native';
import { TappableReference } from '../TappableReference';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { ParsedRef } from '../../types';
import type { ParsedRef, RecEntry } from '../../types';

interface Props { entries: any[]; onRefPress?: (ref: ParsedRef) => void; }
interface Props { entries: RecEntry[]; onRefPress?: (ref: ParsedRef) => void; }

export function ReceptionPanel({ entries, onRefPress }: Props) {
const colors = getPanelColors('rec');
Expand All@@ -18,11 +18,9 @@ export function ReceptionPanel({ entries, onRefPress }: Props) {

return (
<View style={{ gap: spacing.md }}>
{entries.map((e: any, i: number) => {
// Handle both shapes: { title, quote, note }
// and legacy: { who, text }
const heading = e.title ?? e.who ?? '';
const body = e.quote ?? e.text ?? '';
{entries.map((e, i: number) => {
const heading = e.title ?? '';
const body = e.quote ?? '';
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy who/text keys in ReceptionPanel

This change drops support for the existing legacy reception shape (who/text) and only reads title/quote, so chapters with legacy panel data now render blank entries instead of content. The repository still contains legacy rec entries (for example content/proverbs/2.json), and the content normalizer leaves dict-form rec entries as-is (_tools/shared.py), so this is a real runtime regression for current data rather than just a type-only cleanup.

Useful? React with 👍 / 👎.

const note = e.note ?? '';

return (
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/panels/TranslationPanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { TransPanel } from '../../types';

interface TransRow {
verse_ref?: string;
translations: { version: string; text: string }[];
}

interface Props { data: any; }
interface Props { data: string | TransPanel; }

/**
* Parse legacy HTML table format: <tr><td class="t-label">NIV</td><td>...</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion app/src/hooks/useBookIntro.ts
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { getBookIntro } from '../db/content';
import { safeParse } from '../utils/logger';
import type { ParsedBookIntro } from '../types';

export function useBookIntro(bookId: string | null) {
const [intro, setIntro] = useState<any>(null);
const [intro, setIntro] = useState<ParsedBookIntro | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/navigation/types.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,9 +30,9 @@ export type HomeStackParamList = {

export type ExploreStackParamList = {
ExploreMenu: undefined;
GenealogyTree: undefined;
GenealogyTree: { personId?: string } | undefined;
PersonDetail: { personId: string };
Map: { storyId?: string };
Map: { storyId?: string; placeId?: string };
Timeline: { eventId?: string };
WordStudyBrowse: undefined;
WordStudyDetail: { wordId: string };
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/AllNotesScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Search, X, Plus, Folder, Tag, FileText } from 'lucide-react-native';
import { ScreenHeader } from '../components/ScreenHeader';
import {
Expand DownExpand Up@@ -64,7 +65,7 @@ function parseTags(json: string): string[] {
}

export default function AllNotesScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'AllNotes'>>();
const [activeTab, setActiveTab] = useState<TabKey>('all');

// All tab state
Expand Down
7 changes: 4 additions & 3 deletions app/src/screens/BookIntroScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { BookIntroSection, BookIntroOutlineItem, BookIntroPlanItem } from '../types';
import { useBookIntro } from '../hooks/useBookIntro';
import { ScreenHeader } from '../components/ScreenHeader';
import { LoadingSkeleton } from '../components/LoadingSkeleton';
Expand DownExpand Up@@ -72,7 +73,7 @@ export default function BookIntroScreen() {
)}

{/* Sections */}
{intro.sections?.map((section: any, i: number) => (
{intro.sections?.map((section: BookIntroSection, i: number) => (
<View key={i} style={styles.section}>
{section.heading && (
<Text style={styles.sectionHeading}>{section.heading}</Text>
Expand All@@ -88,7 +89,7 @@ export default function BookIntroScreen() {
{/* Outline (structured list with label + chapters + note) */}
{section.outline && Array.isArray(section.outline) && (
<View style={styles.outlineBlock}>
{section.outline.map((item: any, j: number) => (
{section.outline.map((item: BookIntroOutlineItem, j: number) => (
<View key={j} style={styles.outlineItem}>
<View style={styles.outlineRow}>
<Text style={styles.outlineLabel}>{item.label}</Text>
Expand DownExpand Up@@ -118,7 +119,7 @@ export default function BookIntroScreen() {
{/* Reading Plan (ref + label list) */}
{section.plan && Array.isArray(section.plan) && (
<View style={styles.planBlock}>
{section.plan.map((item: any, j: number) => (
{section.plan.map((item: BookIntroPlanItem, j: number) => (
<View key={j} style={styles.planItem}>
<Text style={styles.planRef}>{item.ref}</Text>
<Text style={styles.planLabel}>{item.label}</Text>
Expand Down
5 changes: 3 additions & 2 deletions app/src/screens/BookListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import React, { useState, useMemo, useRef } from 'react';
import { View, Text, TouchableOpacity, SectionList, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { useBooks, type BookWithProgress } from '../hooks/useBooks';
import { useSettingsStore } from '../stores';
Expand All@@ -36,9 +37,9 @@ const NT_GROUPS = [
];

export default function BookListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'BookList'>>();
const scrollRef = useRef<FlatList>(null);
useScrollToTop(scrollRef as any);
useScrollToTop(scrollRef);

const { books } = useBooks();
const mode = useSettingsStore((s) => s.bookListMode);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/BookmarkListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,15 @@ import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, Alert, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getBookmarks, removeBookmark } from '../db/user';
import { parseVerseRef, displayRef } from '../utils/verseRef';
import { ScreenHeader } from '../components/ScreenHeader';
import { base, spacing, fontFamily } from '../theme';
import type { Bookmark } from '../types';

export default function BookmarkListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'Bookmarks'>>();
const [bookmarks, setBookmarks] = useState<Bookmark[]>([]);

const reload = () => getBookmarks().then(setBookmarks);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ChapterScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import { View, ScrollView, LayoutAnimation, Platform, UIManager, StyleSheet, type NativeSyntheticEvent, type NativeScrollEvent, type GestureResponderEvent } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { Book } from '../types';

import { useChapterData } from '../hooks/useChapterData';
import { useNotedVerses } from '../hooks/useNotedVerses';
Expand DownExpand Up@@ -58,7 +59,7 @@ export default function ChapterScreen() {
const scrollRef = useRef<ScrollView>(null);
const sectionYMap = useRef<Record<string, number>>({});
const btnRowYMap = useRef<Record<string, number>>({});
const [bookData, setBookData] = React.useState<any>(null);
const [bookData, setBookData] = React.useState<Book | null>(null);
const [scrollProgress, setScrollProgress] = useState(0);

// Scroll progress tracking
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ExploreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { base, spacing, radii, fontFamily } from '../theme';

Expand DownExpand Up@@ -70,7 +71,7 @@ const GRID_FEATURES: Feature[] = [
];

export default function ExploreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Explore', 'ExploreMenu'>>();
const scrollRef = useRef<ScrollView>(null);
useScrollToTop(scrollRef);

Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/GenealogyTreeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,12 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';
import { base, spacing } from '../theme';
import type { Person } from '../types';
import type { TreePerson } from '../utils/treeBuilder';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';

export default function GenealogyTreeScreen({ route, navigation }: any) {
export default function GenealogyTreeScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'GenealogyTree'>;
navigation: ScreenNavProp<'Explore', 'GenealogyTree'>;
}) {
useLandscapeUnlock();
const initialPersonId = route?.params?.personId;
const { people, isLoading } = usePeople();
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/HomeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import React, { useState, useCallback, useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, RefreshControl, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { ArrowRight } from 'lucide-react-native';
import { useHomeData } from '../hooks/useHomeData';
Expand All@@ -22,7 +23,7 @@ import { base, spacing, radii, fontFamily } from '../theme';
const TOTAL_BIBLE_CHAPTERS = 1189;

export default function HomeScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Home', 'HomeMain'>>();
const { greeting, subtitle, verse, recentChapters, readingStats, isLoading, refresh } = useHomeData();
const [refreshing, setRefreshing] = useState(false);
const scrollRef = useRef<ScrollView>(null);
Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/MapScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';

import { base, spacing } from '../theme';
import type { MapStory, Place } from '../types';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import { logger } from '../utils/logger';

const INITIAL_REGION = {
Expand All@@ -44,7 +45,10 @@ const INITIAL_REGION = {
longitudeDelta: 30,
};

export default function MapScreen({ route, navigation }: any) {
export default function MapScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'Map'>;
navigation: ScreenNavProp<'Explore', 'Map'>;
}) {
useLandscapeUnlock();
const initialStoryId = route?.params?.storyId;
const initialPlaceId = route?.params?.placeId;
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/MoreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Bookmark, Clock, Calendar, Settings, ArrowRight, StickyNote } from 'lucide-react-native';
import { base, spacing, radii, MIN_TOUCH_TARGET, fontFamily } from '../theme';

Expand All@@ -27,7 +28,7 @@ const MENU_ITEMS: MenuItem[] = [
];

export default function MoreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'MoreMenu'>>();

return (
<SafeAreaView style={styles.container}>
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ParallelPassageScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { View, Text, TouchableOpacity, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getSynopticEntries } from '../db/content';
import { resolveVerseText, parseReference } from '../utils/verseResolver';
import { useSettingsStore } from '../stores';
Expand All@@ -24,7 +25,7 @@ const CATEGORY_LABELS: Record<string, string> = {
};

export default function ParallelPassageScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'ParallelPassage'>>();
const [entries, setEntries] = useState<SynopticEntry[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [catFilter, setCatFilter] = useState<string>('all');
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/components/ChapterSkeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
*/

import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, type ViewStyle, type DimensionValue } from 'react-native';
import Animated, {
useSharedValue,
useAnimatedStyle,
Expand All@@ -17,15 +17,15 @@ import Animated, {
import { base, spacing, radii } from '../theme';

function Bone({ width, height = 14, style }: {
width: number | string;
width: DimensionValue;
height?: number;
style?: any;
style?: ViewStyle;
}) {
return (
<View
style={[
{
width: width as any,
width,
height,
backgroundColor: base.bgSurface,
borderRadius: radii.sm,
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/ScholarInfoSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import { View, Text, TouchableOpacity, Modal, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getScholar } from '../db/content';
import { getScholarColor, base, spacing, radii, fontFamily } from '../theme';
import type { Scholar } from '../types';
import type { Scholar, ScholarBio } from '../types';
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -20,7 +20,7 @@ interface Props {

export function ScholarInfoSheet({ visible, onClose, scholarId, onGoToFullBio }: Props) {
const [scholar, setScholar] = useState<Scholar | null>(null);
const [bio, setBio] = useState<any>(null);
const [bio, setBio] = useState<ScholarBio | null>(null);

useEffect(() => {
if (!scholarId || !visible) return;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/SectionBlock.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { View, StyleSheet } from 'react-native';
import { SectionHeader } from './SectionHeader';
import { VerseBlock } from './VerseBlock';
import { base, spacing } from '../theme';
import type { Section, SectionPanel, Verse, VHLGroup } from '../types';
import type { Section, SectionPanel, Verse, VHLGroup, ParsedRef } from '../types';

interface Props {
section: Section;
Expand All@@ -24,7 +24,7 @@ interface Props {
fontSize?: number;
onPanelToggle: (sectionId: string, panelType: string) => void;
onNotePress?: (verseNum: number) => void;
onRefPress?: (ref: any) => void;
onRefPress?: (ref: ParsedRef) => void;
/** Render prop for button row — injected by parent to avoid circular deps */
renderButtonRow?: (panels: SectionPanel[], sectionId: string) => React.ReactNode;
/** Render prop for active panel content */
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/ThreadViewerSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,12 @@ import { getCrossRefThread } from '../db/content';
import { BadgeChip } from './BadgeChip';
import { base, spacing, radii, fontFamily } from '../theme';
import type { CrossRefThread } from '../types';

interface CrossRefStep {
ref: string;
note?: string;
text?: string;
}
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -24,7 +30,7 @@ interface Props {

export function ThreadViewerSheet({ visible, onClose, threadId, currentBookId, currentChapter, onGoToRef }: Props) {
const [thread, setThread] = useState<CrossRefThread | null>(null);
const [steps, setSteps] = useState<any[]>([]);
const [steps, setSteps] = useState<CrossRefStep[]>([]);

useEffect(() => {
if (!threadId || !visible) return;
Expand Down
13 changes: 7 additions & 6 deletions app/src/components/panels/DebatePanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { DebateEntry } from '../../types';

interface Props { entries: any[]; onScholarPress?: (scholarId: string) => void; }
interface Props { entries: DebateEntry[]; onScholarPress?: (scholarId: string) => void; }

export function DebatePanel({ entries, onScholarPress }: Props) {
const colors = getPanelColors('debate');
Expand All@@ -13,17 +14,17 @@ export function DebatePanel({ entries, onScholarPress }: Props) {
{entries.map((d, i) => {
// Handle both shapes: { topic, positions: [{scholar, position}] }
// and legacy: { title, positions: [{name, proponents, argument}] }
const heading = d.topic ?? d.title ?? 'Debate';
const positions: any[] = d.positions ?? [];
const heading = d.topic ?? 'Debate';
const positions = d.positions ?? [];

return (
<View key={i} style={{ gap: spacing.sm }}>
<Text style={{ color: colors.accent, fontFamily: fontFamily.displayMedium, fontSize: 13 }}>
{heading}
</Text>
{positions.map((p: any, j: number) => {
const label = p.scholar ?? p.name ?? 'Scholar';
const body = p.position ?? p.argument ?? p.proponents ?? '';
{positions.map((p, j: number) => {
const label = p.scholar ?? 'Scholar';
const body = p.position ?? '';
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy debate position keys when rendering

The renderer now reads only p.scholar/p.position, but existing debate data uses legacy position fields like name, argument, and proponents (for example content/proverbs/2.json). Since there is no runtime normalization in the app for these keys, debate rows lose their labels/body text and degrade to placeholder output, which removes substantive chapter content for users.

Useful? React with 👍 / 👎.


return (
<View key={j} style={{ gap: 4, paddingLeft: spacing.sm }}>
Expand Down
12 changes: 5 additions & 7 deletions app/src/components/panels/ReceptionPanel.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@ import React from 'react';
import { View, Text } from 'react-native';
import { TappableReference } from '../TappableReference';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { ParsedRef } from '../../types';
import type { ParsedRef, RecEntry } from '../../types';

interface Props { entries: any[]; onRefPress?: (ref: ParsedRef) => void; }
interface Props { entries: RecEntry[]; onRefPress?: (ref: ParsedRef) => void; }

export function ReceptionPanel({ entries, onRefPress }: Props) {
const colors = getPanelColors('rec');
Expand All@@ -18,11 +18,9 @@ export function ReceptionPanel({ entries, onRefPress }: Props) {

return (
<View style={{ gap: spacing.md }}>
{entries.map((e: any, i: number) => {
// Handle both shapes: { title, quote, note }
// and legacy: { who, text }
const heading = e.title ?? e.who ?? '';
const body = e.quote ?? e.text ?? '';
{entries.map((e, i: number) => {
const heading = e.title ?? '';
const body = e.quote ?? '';
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy who/text keys in ReceptionPanel

This change drops support for the existing legacy reception shape (who/text) and only reads title/quote, so chapters with legacy panel data now render blank entries instead of content. The repository still contains legacy rec entries (for example content/proverbs/2.json), and the content normalizer leaves dict-form rec entries as-is (_tools/shared.py), so this is a real runtime regression for current data rather than just a type-only cleanup.

Useful? React with 👍 / 👎.

const note = e.note ?? '';

return (
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/panels/TranslationPanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { TransPanel } from '../../types';

interface TransRow {
verse_ref?: string;
translations: { version: string; text: string }[];
}

interface Props { data: any; }
interface Props { data: string | TransPanel; }

/**
* Parse legacy HTML table format: <tr><td class="t-label">NIV</td><td>...</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion app/src/hooks/useBookIntro.ts
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { getBookIntro } from '../db/content';
import { safeParse } from '../utils/logger';
import type { ParsedBookIntro } from '../types';

export function useBookIntro(bookId: string | null) {
const [intro, setIntro] = useState<any>(null);
const [intro, setIntro] = useState<ParsedBookIntro | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/navigation/types.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,9 +30,9 @@ export type HomeStackParamList = {

export type ExploreStackParamList = {
ExploreMenu: undefined;
GenealogyTree: undefined;
GenealogyTree: { personId?: string } | undefined;
PersonDetail: { personId: string };
Map: { storyId?: string };
Map: { storyId?: string; placeId?: string };
Timeline: { eventId?: string };
WordStudyBrowse: undefined;
WordStudyDetail: { wordId: string };
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/AllNotesScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Search, X, Plus, Folder, Tag, FileText } from 'lucide-react-native';
import { ScreenHeader } from '../components/ScreenHeader';
import {
Expand DownExpand Up@@ -64,7 +65,7 @@ function parseTags(json: string): string[] {
}

export default function AllNotesScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'AllNotes'>>();
const [activeTab, setActiveTab] = useState<TabKey>('all');

// All tab state
Expand Down
7 changes: 4 additions & 3 deletions app/src/screens/BookIntroScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { BookIntroSection, BookIntroOutlineItem, BookIntroPlanItem } from '../types';
import { useBookIntro } from '../hooks/useBookIntro';
import { ScreenHeader } from '../components/ScreenHeader';
import { LoadingSkeleton } from '../components/LoadingSkeleton';
Expand DownExpand Up@@ -72,7 +73,7 @@ export default function BookIntroScreen() {
)}

{/* Sections */}
{intro.sections?.map((section: any, i: number) => (
{intro.sections?.map((section: BookIntroSection, i: number) => (
<View key={i} style={styles.section}>
{section.heading && (
<Text style={styles.sectionHeading}>{section.heading}</Text>
Expand All@@ -88,7 +89,7 @@ export default function BookIntroScreen() {
{/* Outline (structured list with label + chapters + note) */}
{section.outline && Array.isArray(section.outline) && (
<View style={styles.outlineBlock}>
{section.outline.map((item: any, j: number) => (
{section.outline.map((item: BookIntroOutlineItem, j: number) => (
<View key={j} style={styles.outlineItem}>
<View style={styles.outlineRow}>
<Text style={styles.outlineLabel}>{item.label}</Text>
Expand DownExpand Up@@ -118,7 +119,7 @@ export default function BookIntroScreen() {
{/* Reading Plan (ref + label list) */}
{section.plan && Array.isArray(section.plan) && (
<View style={styles.planBlock}>
{section.plan.map((item: any, j: number) => (
{section.plan.map((item: BookIntroPlanItem, j: number) => (
<View key={j} style={styles.planItem}>
<Text style={styles.planRef}>{item.ref}</Text>
<Text style={styles.planLabel}>{item.label}</Text>
Expand Down
5 changes: 3 additions & 2 deletions app/src/screens/BookListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import React, { useState, useMemo, useRef } from 'react';
import { View, Text, TouchableOpacity, SectionList, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { useBooks, type BookWithProgress } from '../hooks/useBooks';
import { useSettingsStore } from '../stores';
Expand All@@ -36,9 +37,9 @@ const NT_GROUPS = [
];

export default function BookListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'BookList'>>();
const scrollRef = useRef<FlatList>(null);
useScrollToTop(scrollRef as any);
useScrollToTop(scrollRef);

const { books } = useBooks();
const mode = useSettingsStore((s) => s.bookListMode);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/BookmarkListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,15 @@ import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, Alert, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getBookmarks, removeBookmark } from '../db/user';
import { parseVerseRef, displayRef } from '../utils/verseRef';
import { ScreenHeader } from '../components/ScreenHeader';
import { base, spacing, fontFamily } from '../theme';
import type { Bookmark } from '../types';

export default function BookmarkListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'Bookmarks'>>();
const [bookmarks, setBookmarks] = useState<Bookmark[]>([]);

const reload = () => getBookmarks().then(setBookmarks);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ChapterScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import { View, ScrollView, LayoutAnimation, Platform, UIManager, StyleSheet, type NativeSyntheticEvent, type NativeScrollEvent, type GestureResponderEvent } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { Book } from '../types';

import { useChapterData } from '../hooks/useChapterData';
import { useNotedVerses } from '../hooks/useNotedVerses';
Expand DownExpand Up@@ -58,7 +59,7 @@ export default function ChapterScreen() {
const scrollRef = useRef<ScrollView>(null);
const sectionYMap = useRef<Record<string, number>>({});
const btnRowYMap = useRef<Record<string, number>>({});
const [bookData, setBookData] = React.useState<any>(null);
const [bookData, setBookData] = React.useState<Book | null>(null);
const [scrollProgress, setScrollProgress] = useState(0);

// Scroll progress tracking
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ExploreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { base, spacing, radii, fontFamily } from '../theme';

Expand DownExpand Up@@ -70,7 +71,7 @@ const GRID_FEATURES: Feature[] = [
];

export default function ExploreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Explore', 'ExploreMenu'>>();
const scrollRef = useRef<ScrollView>(null);
useScrollToTop(scrollRef);

Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/GenealogyTreeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,12 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';
import { base, spacing } from '../theme';
import type { Person } from '../types';
import type { TreePerson } from '../utils/treeBuilder';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';

export default function GenealogyTreeScreen({ route, navigation }: any) {
export default function GenealogyTreeScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'GenealogyTree'>;
navigation: ScreenNavProp<'Explore', 'GenealogyTree'>;
}) {
useLandscapeUnlock();
const initialPersonId = route?.params?.personId;
const { people, isLoading } = usePeople();
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/HomeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import React, { useState, useCallback, useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, RefreshControl, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { ArrowRight } from 'lucide-react-native';
import { useHomeData } from '../hooks/useHomeData';
Expand All@@ -22,7 +23,7 @@ import { base, spacing, radii, fontFamily } from '../theme';
const TOTAL_BIBLE_CHAPTERS = 1189;

export default function HomeScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Home', 'HomeMain'>>();
const { greeting, subtitle, verse, recentChapters, readingStats, isLoading, refresh } = useHomeData();
const [refreshing, setRefreshing] = useState(false);
const scrollRef = useRef<ScrollView>(null);
Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/MapScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';

import { base, spacing } from '../theme';
import type { MapStory, Place } from '../types';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import { logger } from '../utils/logger';

const INITIAL_REGION = {
Expand All@@ -44,7 +45,10 @@ const INITIAL_REGION = {
longitudeDelta: 30,
};

export default function MapScreen({ route, navigation }: any) {
export default function MapScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'Map'>;
navigation: ScreenNavProp<'Explore', 'Map'>;
}) {
useLandscapeUnlock();
const initialStoryId = route?.params?.storyId;
const initialPlaceId = route?.params?.placeId;
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/MoreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Bookmark, Clock, Calendar, Settings, ArrowRight, StickyNote } from 'lucide-react-native';
import { base, spacing, radii, MIN_TOUCH_TARGET, fontFamily } from '../theme';

Expand All@@ -27,7 +28,7 @@ const MENU_ITEMS: MenuItem[] = [
];

export default function MoreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'MoreMenu'>>();

return (
<SafeAreaView style={styles.container}>
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ParallelPassageScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { View, Text, TouchableOpacity, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getSynopticEntries } from '../db/content';
import { resolveVerseText, parseReference } from '../utils/verseResolver';
import { useSettingsStore } from '../stores';
Expand All@@ -24,7 +25,7 @@ const CATEGORY_LABELS: Record<string, string> = {
};

export default function ParallelPassageScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'ParallelPassage'>>();
const [entries, setEntries] = useState<SynopticEntry[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [catFilter, setCatFilter] = useState<string>('all');
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/components/ChapterSkeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
*/

import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, type ViewStyle, type DimensionValue } from 'react-native';
import Animated, {
useSharedValue,
useAnimatedStyle,
Expand All@@ -17,15 +17,15 @@ import Animated, {
import { base, spacing, radii } from '../theme';

function Bone({ width, height = 14, style }: {
width: number | string;
width: DimensionValue;
height?: number;
style?: any;
style?: ViewStyle;
}) {
return (
<View
style={[
{
width: width as any,
width,
height,
backgroundColor: base.bgSurface,
borderRadius: radii.sm,
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/ScholarInfoSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import { View, Text, TouchableOpacity, Modal, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getScholar } from '../db/content';
import { getScholarColor, base, spacing, radii, fontFamily } from '../theme';
import type { Scholar } from '../types';
import type { Scholar, ScholarBio } from '../types';
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -20,7 +20,7 @@ interface Props {

export function ScholarInfoSheet({ visible, onClose, scholarId, onGoToFullBio }: Props) {
const [scholar, setScholar] = useState<Scholar | null>(null);
const [bio, setBio] = useState<any>(null);
const [bio, setBio] = useState<ScholarBio | null>(null);

useEffect(() => {
if (!scholarId || !visible) return;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/SectionBlock.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { View, StyleSheet } from 'react-native';
import { SectionHeader } from './SectionHeader';
import { VerseBlock } from './VerseBlock';
import { base, spacing } from '../theme';
import type { Section, SectionPanel, Verse, VHLGroup } from '../types';
import type { Section, SectionPanel, Verse, VHLGroup, ParsedRef } from '../types';

interface Props {
section: Section;
Expand All@@ -24,7 +24,7 @@ interface Props {
fontSize?: number;
onPanelToggle: (sectionId: string, panelType: string) => void;
onNotePress?: (verseNum: number) => void;
onRefPress?: (ref: any) => void;
onRefPress?: (ref: ParsedRef) => void;
/** Render prop for button row — injected by parent to avoid circular deps */
renderButtonRow?: (panels: SectionPanel[], sectionId: string) => React.ReactNode;
/** Render prop for active panel content */
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/ThreadViewerSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,12 @@ import { getCrossRefThread } from '../db/content';
import { BadgeChip } from './BadgeChip';
import { base, spacing, radii, fontFamily } from '../theme';
import type { CrossRefThread } from '../types';

interface CrossRefStep {
ref: string;
note?: string;
text?: string;
}
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -24,7 +30,7 @@ interface Props {

export function ThreadViewerSheet({ visible, onClose, threadId, currentBookId, currentChapter, onGoToRef }: Props) {
const [thread, setThread] = useState<CrossRefThread | null>(null);
const [steps, setSteps] = useState<any[]>([]);
const [steps, setSteps] = useState<CrossRefStep[]>([]);

useEffect(() => {
if (!threadId || !visible) return;
Expand Down
13 changes: 7 additions & 6 deletions app/src/components/panels/DebatePanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { DebateEntry } from '../../types';

interface Props { entries: any[]; onScholarPress?: (scholarId: string) => void; }
interface Props { entries: DebateEntry[]; onScholarPress?: (scholarId: string) => void; }

export function DebatePanel({ entries, onScholarPress }: Props) {
const colors = getPanelColors('debate');
Expand All@@ -13,17 +14,17 @@ export function DebatePanel({ entries, onScholarPress }: Props) {
{entries.map((d, i) => {
// Handle both shapes: { topic, positions: [{scholar, position}] }
// and legacy: { title, positions: [{name, proponents, argument}] }
const heading = d.topic ?? d.title ?? 'Debate';
const positions: any[] = d.positions ?? [];
const heading = d.topic ?? 'Debate';
const positions = d.positions ?? [];

return (
<View key={i} style={{ gap: spacing.sm }}>
<Text style={{ color: colors.accent, fontFamily: fontFamily.displayMedium, fontSize: 13 }}>
{heading}
</Text>
{positions.map((p: any, j: number) => {
const label = p.scholar ?? p.name ?? 'Scholar';
const body = p.position ?? p.argument ?? p.proponents ?? '';
{positions.map((p, j: number) => {
const label = p.scholar ?? 'Scholar';
const body = p.position ?? '';
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy debate position keys when rendering

The renderer now reads only p.scholar/p.position, but existing debate data uses legacy position fields like name, argument, and proponents (for example content/proverbs/2.json). Since there is no runtime normalization in the app for these keys, debate rows lose their labels/body text and degrade to placeholder output, which removes substantive chapter content for users.

Useful? React with 👍 / 👎.


return (
<View key={j} style={{ gap: 4, paddingLeft: spacing.sm }}>
Expand Down
12 changes: 5 additions & 7 deletions app/src/components/panels/ReceptionPanel.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@ import React from 'react';
import { View, Text } from 'react-native';
import { TappableReference } from '../TappableReference';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { ParsedRef } from '../../types';
import type { ParsedRef, RecEntry } from '../../types';

interface Props { entries: any[]; onRefPress?: (ref: ParsedRef) => void; }
interface Props { entries: RecEntry[]; onRefPress?: (ref: ParsedRef) => void; }

export function ReceptionPanel({ entries, onRefPress }: Props) {
const colors = getPanelColors('rec');
Expand All@@ -18,11 +18,9 @@ export function ReceptionPanel({ entries, onRefPress }: Props) {

return (
<View style={{ gap: spacing.md }}>
{entries.map((e: any, i: number) => {
// Handle both shapes: { title, quote, note }
// and legacy: { who, text }
const heading = e.title ?? e.who ?? '';
const body = e.quote ?? e.text ?? '';
{entries.map((e, i: number) => {
const heading = e.title ?? '';
const body = e.quote ?? '';
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy who/text keys in ReceptionPanel

This change drops support for the existing legacy reception shape (who/text) and only reads title/quote, so chapters with legacy panel data now render blank entries instead of content. The repository still contains legacy rec entries (for example content/proverbs/2.json), and the content normalizer leaves dict-form rec entries as-is (_tools/shared.py), so this is a real runtime regression for current data rather than just a type-only cleanup.

Useful? React with 👍 / 👎.

const note = e.note ?? '';

return (
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/panels/TranslationPanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { TransPanel } from '../../types';

interface TransRow {
verse_ref?: string;
translations: { version: string; text: string }[];
}

interface Props { data: any; }
interface Props { data: string | TransPanel; }

/**
* Parse legacy HTML table format: <tr><td class="t-label">NIV</td><td>...</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion app/src/hooks/useBookIntro.ts
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { getBookIntro } from '../db/content';
import { safeParse } from '../utils/logger';
import type { ParsedBookIntro } from '../types';

export function useBookIntro(bookId: string | null) {
const [intro, setIntro] = useState<any>(null);
const [intro, setIntro] = useState<ParsedBookIntro | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/navigation/types.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,9 +30,9 @@ export type HomeStackParamList = {

export type ExploreStackParamList = {
ExploreMenu: undefined;
GenealogyTree: undefined;
GenealogyTree: { personId?: string } | undefined;
PersonDetail: { personId: string };
Map: { storyId?: string };
Map: { storyId?: string; placeId?: string };
Timeline: { eventId?: string };
WordStudyBrowse: undefined;
WordStudyDetail: { wordId: string };
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/AllNotesScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Search, X, Plus, Folder, Tag, FileText } from 'lucide-react-native';
import { ScreenHeader } from '../components/ScreenHeader';
import {
Expand DownExpand Up@@ -64,7 +65,7 @@ function parseTags(json: string): string[] {
}

export default function AllNotesScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'AllNotes'>>();
const [activeTab, setActiveTab] = useState<TabKey>('all');

// All tab state
Expand Down
7 changes: 4 additions & 3 deletions app/src/screens/BookIntroScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { BookIntroSection, BookIntroOutlineItem, BookIntroPlanItem } from '../types';
import { useBookIntro } from '../hooks/useBookIntro';
import { ScreenHeader } from '../components/ScreenHeader';
import { LoadingSkeleton } from '../components/LoadingSkeleton';
Expand DownExpand Up@@ -72,7 +73,7 @@ export default function BookIntroScreen() {
)}

{/* Sections */}
{intro.sections?.map((section: any, i: number) => (
{intro.sections?.map((section: BookIntroSection, i: number) => (
<View key={i} style={styles.section}>
{section.heading && (
<Text style={styles.sectionHeading}>{section.heading}</Text>
Expand All@@ -88,7 +89,7 @@ export default function BookIntroScreen() {
{/* Outline (structured list with label + chapters + note) */}
{section.outline && Array.isArray(section.outline) && (
<View style={styles.outlineBlock}>
{section.outline.map((item: any, j: number) => (
{section.outline.map((item: BookIntroOutlineItem, j: number) => (
<View key={j} style={styles.outlineItem}>
<View style={styles.outlineRow}>
<Text style={styles.outlineLabel}>{item.label}</Text>
Expand DownExpand Up@@ -118,7 +119,7 @@ export default function BookIntroScreen() {
{/* Reading Plan (ref + label list) */}
{section.plan && Array.isArray(section.plan) && (
<View style={styles.planBlock}>
{section.plan.map((item: any, j: number) => (
{section.plan.map((item: BookIntroPlanItem, j: number) => (
<View key={j} style={styles.planItem}>
<Text style={styles.planRef}>{item.ref}</Text>
<Text style={styles.planLabel}>{item.label}</Text>
Expand Down
5 changes: 3 additions & 2 deletions app/src/screens/BookListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import React, { useState, useMemo, useRef } from 'react';
import { View, Text, TouchableOpacity, SectionList, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { useBooks, type BookWithProgress } from '../hooks/useBooks';
import { useSettingsStore } from '../stores';
Expand All@@ -36,9 +37,9 @@ const NT_GROUPS = [
];

export default function BookListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'BookList'>>();
const scrollRef = useRef<FlatList>(null);
useScrollToTop(scrollRef as any);
useScrollToTop(scrollRef);

const { books } = useBooks();
const mode = useSettingsStore((s) => s.bookListMode);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/BookmarkListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,15 @@ import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, Alert, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getBookmarks, removeBookmark } from '../db/user';
import { parseVerseRef, displayRef } from '../utils/verseRef';
import { ScreenHeader } from '../components/ScreenHeader';
import { base, spacing, fontFamily } from '../theme';
import type { Bookmark } from '../types';

export default function BookmarkListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'Bookmarks'>>();
const [bookmarks, setBookmarks] = useState<Bookmark[]>([]);

const reload = () => getBookmarks().then(setBookmarks);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ChapterScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import { View, ScrollView, LayoutAnimation, Platform, UIManager, StyleSheet, type NativeSyntheticEvent, type NativeScrollEvent, type GestureResponderEvent } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { Book } from '../types';

import { useChapterData } from '../hooks/useChapterData';
import { useNotedVerses } from '../hooks/useNotedVerses';
Expand DownExpand Up@@ -58,7 +59,7 @@ export default function ChapterScreen() {
const scrollRef = useRef<ScrollView>(null);
const sectionYMap = useRef<Record<string, number>>({});
const btnRowYMap = useRef<Record<string, number>>({});
const [bookData, setBookData] = React.useState<any>(null);
const [bookData, setBookData] = React.useState<Book | null>(null);
const [scrollProgress, setScrollProgress] = useState(0);

// Scroll progress tracking
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ExploreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { base, spacing, radii, fontFamily } from '../theme';

Expand DownExpand Up@@ -70,7 +71,7 @@ const GRID_FEATURES: Feature[] = [
];

export default function ExploreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Explore', 'ExploreMenu'>>();
const scrollRef = useRef<ScrollView>(null);
useScrollToTop(scrollRef);

Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/GenealogyTreeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,12 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';
import { base, spacing } from '../theme';
import type { Person } from '../types';
import type { TreePerson } from '../utils/treeBuilder';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';

export default function GenealogyTreeScreen({ route, navigation }: any) {
export default function GenealogyTreeScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'GenealogyTree'>;
navigation: ScreenNavProp<'Explore', 'GenealogyTree'>;
}) {
useLandscapeUnlock();
const initialPersonId = route?.params?.personId;
const { people, isLoading } = usePeople();
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/HomeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import React, { useState, useCallback, useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, RefreshControl, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { ArrowRight } from 'lucide-react-native';
import { useHomeData } from '../hooks/useHomeData';
Expand All@@ -22,7 +23,7 @@ import { base, spacing, radii, fontFamily } from '../theme';
const TOTAL_BIBLE_CHAPTERS = 1189;

export default function HomeScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Home', 'HomeMain'>>();
const { greeting, subtitle, verse, recentChapters, readingStats, isLoading, refresh } = useHomeData();
const [refreshing, setRefreshing] = useState(false);
const scrollRef = useRef<ScrollView>(null);
Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/MapScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';

import { base, spacing } from '../theme';
import type { MapStory, Place } from '../types';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import { logger } from '../utils/logger';

const INITIAL_REGION = {
Expand All@@ -44,7 +45,10 @@ const INITIAL_REGION = {
longitudeDelta: 30,
};

export default function MapScreen({ route, navigation }: any) {
export default function MapScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'Map'>;
navigation: ScreenNavProp<'Explore', 'Map'>;
}) {
useLandscapeUnlock();
const initialStoryId = route?.params?.storyId;
const initialPlaceId = route?.params?.placeId;
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/MoreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Bookmark, Clock, Calendar, Settings, ArrowRight, StickyNote } from 'lucide-react-native';
import { base, spacing, radii, MIN_TOUCH_TARGET, fontFamily } from '../theme';

Expand All@@ -27,7 +28,7 @@ const MENU_ITEMS: MenuItem[] = [
];

export default function MoreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'MoreMenu'>>();

return (
<SafeAreaView style={styles.container}>
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ParallelPassageScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { View, Text, TouchableOpacity, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getSynopticEntries } from '../db/content';
import { resolveVerseText, parseReference } from '../utils/verseResolver';
import { useSettingsStore } from '../stores';
Expand All@@ -24,7 +25,7 @@ const CATEGORY_LABELS: Record<string, string> = {
};

export default function ParallelPassageScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'ParallelPassage'>>();
const [entries, setEntries] = useState<SynopticEntry[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [catFilter, setCatFilter] = useState<string>('all');
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/components/ChapterSkeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
*/

import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, type ViewStyle, type DimensionValue } from 'react-native';
import Animated, {
useSharedValue,
useAnimatedStyle,
Expand All@@ -17,15 +17,15 @@ import Animated, {
import { base, spacing, radii } from '../theme';

function Bone({ width, height = 14, style }: {
width: number | string;
width: DimensionValue;
height?: number;
style?: any;
style?: ViewStyle;
}) {
return (
<View
style={[
{
width: width as any,
width,
height,
backgroundColor: base.bgSurface,
borderRadius: radii.sm,
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/ScholarInfoSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import { View, Text, TouchableOpacity, Modal, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getScholar } from '../db/content';
import { getScholarColor, base, spacing, radii, fontFamily } from '../theme';
import type { Scholar } from '../types';
import type { Scholar, ScholarBio } from '../types';
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -20,7 +20,7 @@ interface Props {

export function ScholarInfoSheet({ visible, onClose, scholarId, onGoToFullBio }: Props) {
const [scholar, setScholar] = useState<Scholar | null>(null);
const [bio, setBio] = useState<any>(null);
const [bio, setBio] = useState<ScholarBio | null>(null);

useEffect(() => {
if (!scholarId || !visible) return;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/SectionBlock.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { View, StyleSheet } from 'react-native';
import { SectionHeader } from './SectionHeader';
import { VerseBlock } from './VerseBlock';
import { base, spacing } from '../theme';
import type { Section, SectionPanel, Verse, VHLGroup } from '../types';
import type { Section, SectionPanel, Verse, VHLGroup, ParsedRef } from '../types';

interface Props {
section: Section;
Expand All@@ -24,7 +24,7 @@ interface Props {
fontSize?: number;
onPanelToggle: (sectionId: string, panelType: string) => void;
onNotePress?: (verseNum: number) => void;
onRefPress?: (ref: any) => void;
onRefPress?: (ref: ParsedRef) => void;
/** Render prop for button row — injected by parent to avoid circular deps */
renderButtonRow?: (panels: SectionPanel[], sectionId: string) => React.ReactNode;
/** Render prop for active panel content */
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/ThreadViewerSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,12 @@ import { getCrossRefThread } from '../db/content';
import { BadgeChip } from './BadgeChip';
import { base, spacing, radii, fontFamily } from '../theme';
import type { CrossRefThread } from '../types';

interface CrossRefStep {
ref: string;
note?: string;
text?: string;
}
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -24,7 +30,7 @@ interface Props {

export function ThreadViewerSheet({ visible, onClose, threadId, currentBookId, currentChapter, onGoToRef }: Props) {
const [thread, setThread] = useState<CrossRefThread | null>(null);
const [steps, setSteps] = useState<any[]>([]);
const [steps, setSteps] = useState<CrossRefStep[]>([]);

useEffect(() => {
if (!threadId || !visible) return;
Expand Down
13 changes: 7 additions & 6 deletions app/src/components/panels/DebatePanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { DebateEntry } from '../../types';

interface Props { entries: any[]; onScholarPress?: (scholarId: string) => void; }
interface Props { entries: DebateEntry[]; onScholarPress?: (scholarId: string) => void; }

export function DebatePanel({ entries, onScholarPress }: Props) {
const colors = getPanelColors('debate');
Expand All@@ -13,17 +14,17 @@ export function DebatePanel({ entries, onScholarPress }: Props) {
{entries.map((d, i) => {
// Handle both shapes: { topic, positions: [{scholar, position}] }
// and legacy: { title, positions: [{name, proponents, argument}] }
const heading = d.topic ?? d.title ?? 'Debate';
const positions: any[] = d.positions ?? [];
const heading = d.topic ?? 'Debate';
const positions = d.positions ?? [];

return (
<View key={i} style={{ gap: spacing.sm }}>
<Text style={{ color: colors.accent, fontFamily: fontFamily.displayMedium, fontSize: 13 }}>
{heading}
</Text>
{positions.map((p: any, j: number) => {
const label = p.scholar ?? p.name ?? 'Scholar';
const body = p.position ?? p.argument ?? p.proponents ?? '';
{positions.map((p, j: number) => {
const label = p.scholar ?? 'Scholar';
const body = p.position ?? '';
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy debate position keys when rendering

The renderer now reads only p.scholar/p.position, but existing debate data uses legacy position fields like name, argument, and proponents (for example content/proverbs/2.json). Since there is no runtime normalization in the app for these keys, debate rows lose their labels/body text and degrade to placeholder output, which removes substantive chapter content for users.

Useful? React with 👍 / 👎.


return (
<View key={j} style={{ gap: 4, paddingLeft: spacing.sm }}>
Expand Down
12 changes: 5 additions & 7 deletions app/src/components/panels/ReceptionPanel.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@ import React from 'react';
import { View, Text } from 'react-native';
import { TappableReference } from '../TappableReference';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { ParsedRef } from '../../types';
import type { ParsedRef, RecEntry } from '../../types';

interface Props { entries: any[]; onRefPress?: (ref: ParsedRef) => void; }
interface Props { entries: RecEntry[]; onRefPress?: (ref: ParsedRef) => void; }

export function ReceptionPanel({ entries, onRefPress }: Props) {
const colors = getPanelColors('rec');
Expand All@@ -18,11 +18,9 @@ export function ReceptionPanel({ entries, onRefPress }: Props) {

return (
<View style={{ gap: spacing.md }}>
{entries.map((e: any, i: number) => {
// Handle both shapes: { title, quote, note }
// and legacy: { who, text }
const heading = e.title ?? e.who ?? '';
const body = e.quote ?? e.text ?? '';
{entries.map((e, i: number) => {
const heading = e.title ?? '';
const body = e.quote ?? '';
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy who/text keys in ReceptionPanel

This change drops support for the existing legacy reception shape (who/text) and only reads title/quote, so chapters with legacy panel data now render blank entries instead of content. The repository still contains legacy rec entries (for example content/proverbs/2.json), and the content normalizer leaves dict-form rec entries as-is (_tools/shared.py), so this is a real runtime regression for current data rather than just a type-only cleanup.

Useful? React with 👍 / 👎.

const note = e.note ?? '';

return (
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/panels/TranslationPanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { TransPanel } from '../../types';

interface TransRow {
verse_ref?: string;
translations: { version: string; text: string }[];
}

interface Props { data: any; }
interface Props { data: string | TransPanel; }

/**
* Parse legacy HTML table format: <tr><td class="t-label">NIV</td><td>...</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion app/src/hooks/useBookIntro.ts
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { getBookIntro } from '../db/content';
import { safeParse } from '../utils/logger';
import type { ParsedBookIntro } from '../types';

export function useBookIntro(bookId: string | null) {
const [intro, setIntro] = useState<any>(null);
const [intro, setIntro] = useState<ParsedBookIntro | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/navigation/types.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,9 +30,9 @@ export type HomeStackParamList = {

export type ExploreStackParamList = {
ExploreMenu: undefined;
GenealogyTree: undefined;
GenealogyTree: { personId?: string } | undefined;
PersonDetail: { personId: string };
Map: { storyId?: string };
Map: { storyId?: string; placeId?: string };
Timeline: { eventId?: string };
WordStudyBrowse: undefined;
WordStudyDetail: { wordId: string };
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/AllNotesScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Search, X, Plus, Folder, Tag, FileText } from 'lucide-react-native';
import { ScreenHeader } from '../components/ScreenHeader';
import {
Expand DownExpand Up@@ -64,7 +65,7 @@ function parseTags(json: string): string[] {
}

export default function AllNotesScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'AllNotes'>>();
const [activeTab, setActiveTab] = useState<TabKey>('all');

// All tab state
Expand Down
7 changes: 4 additions & 3 deletions app/src/screens/BookIntroScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { BookIntroSection, BookIntroOutlineItem, BookIntroPlanItem } from '../types';
import { useBookIntro } from '../hooks/useBookIntro';
import { ScreenHeader } from '../components/ScreenHeader';
import { LoadingSkeleton } from '../components/LoadingSkeleton';
Expand DownExpand Up@@ -72,7 +73,7 @@ export default function BookIntroScreen() {
)}

{/* Sections */}
{intro.sections?.map((section: any, i: number) => (
{intro.sections?.map((section: BookIntroSection, i: number) => (
<View key={i} style={styles.section}>
{section.heading && (
<Text style={styles.sectionHeading}>{section.heading}</Text>
Expand All@@ -88,7 +89,7 @@ export default function BookIntroScreen() {
{/* Outline (structured list with label + chapters + note) */}
{section.outline && Array.isArray(section.outline) && (
<View style={styles.outlineBlock}>
{section.outline.map((item: any, j: number) => (
{section.outline.map((item: BookIntroOutlineItem, j: number) => (
<View key={j} style={styles.outlineItem}>
<View style={styles.outlineRow}>
<Text style={styles.outlineLabel}>{item.label}</Text>
Expand DownExpand Up@@ -118,7 +119,7 @@ export default function BookIntroScreen() {
{/* Reading Plan (ref + label list) */}
{section.plan && Array.isArray(section.plan) && (
<View style={styles.planBlock}>
{section.plan.map((item: any, j: number) => (
{section.plan.map((item: BookIntroPlanItem, j: number) => (
<View key={j} style={styles.planItem}>
<Text style={styles.planRef}>{item.ref}</Text>
<Text style={styles.planLabel}>{item.label}</Text>
Expand Down
5 changes: 3 additions & 2 deletions app/src/screens/BookListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import React, { useState, useMemo, useRef } from 'react';
import { View, Text, TouchableOpacity, SectionList, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { useBooks, type BookWithProgress } from '../hooks/useBooks';
import { useSettingsStore } from '../stores';
Expand All@@ -36,9 +37,9 @@ const NT_GROUPS = [
];

export default function BookListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'BookList'>>();
const scrollRef = useRef<FlatList>(null);
useScrollToTop(scrollRef as any);
useScrollToTop(scrollRef);

const { books } = useBooks();
const mode = useSettingsStore((s) => s.bookListMode);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/BookmarkListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,15 @@ import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, Alert, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getBookmarks, removeBookmark } from '../db/user';
import { parseVerseRef, displayRef } from '../utils/verseRef';
import { ScreenHeader } from '../components/ScreenHeader';
import { base, spacing, fontFamily } from '../theme';
import type { Bookmark } from '../types';

export default function BookmarkListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'Bookmarks'>>();
const [bookmarks, setBookmarks] = useState<Bookmark[]>([]);

const reload = () => getBookmarks().then(setBookmarks);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ChapterScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import { View, ScrollView, LayoutAnimation, Platform, UIManager, StyleSheet, type NativeSyntheticEvent, type NativeScrollEvent, type GestureResponderEvent } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { Book } from '../types';

import { useChapterData } from '../hooks/useChapterData';
import { useNotedVerses } from '../hooks/useNotedVerses';
Expand DownExpand Up@@ -58,7 +59,7 @@ export default function ChapterScreen() {
const scrollRef = useRef<ScrollView>(null);
const sectionYMap = useRef<Record<string, number>>({});
const btnRowYMap = useRef<Record<string, number>>({});
const [bookData, setBookData] = React.useState<any>(null);
const [bookData, setBookData] = React.useState<Book | null>(null);
const [scrollProgress, setScrollProgress] = useState(0);

// Scroll progress tracking
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ExploreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { base, spacing, radii, fontFamily } from '../theme';

Expand DownExpand Up@@ -70,7 +71,7 @@ const GRID_FEATURES: Feature[] = [
];

export default function ExploreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Explore', 'ExploreMenu'>>();
const scrollRef = useRef<ScrollView>(null);
useScrollToTop(scrollRef);

Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/GenealogyTreeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,12 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';
import { base, spacing } from '../theme';
import type { Person } from '../types';
import type { TreePerson } from '../utils/treeBuilder';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';

export default function GenealogyTreeScreen({ route, navigation }: any) {
export default function GenealogyTreeScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'GenealogyTree'>;
navigation: ScreenNavProp<'Explore', 'GenealogyTree'>;
}) {
useLandscapeUnlock();
const initialPersonId = route?.params?.personId;
const { people, isLoading } = usePeople();
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/HomeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import React, { useState, useCallback, useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, RefreshControl, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { ArrowRight } from 'lucide-react-native';
import { useHomeData } from '../hooks/useHomeData';
Expand All@@ -22,7 +23,7 @@ import { base, spacing, radii, fontFamily } from '../theme';
const TOTAL_BIBLE_CHAPTERS = 1189;

export default function HomeScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Home', 'HomeMain'>>();
const { greeting, subtitle, verse, recentChapters, readingStats, isLoading, refresh } = useHomeData();
const [refreshing, setRefreshing] = useState(false);
const scrollRef = useRef<ScrollView>(null);
Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/MapScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';

import { base, spacing } from '../theme';
import type { MapStory, Place } from '../types';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import { logger } from '../utils/logger';

const INITIAL_REGION = {
Expand All@@ -44,7 +45,10 @@ const INITIAL_REGION = {
longitudeDelta: 30,
};

export default function MapScreen({ route, navigation }: any) {
export default function MapScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'Map'>;
navigation: ScreenNavProp<'Explore', 'Map'>;
}) {
useLandscapeUnlock();
const initialStoryId = route?.params?.storyId;
const initialPlaceId = route?.params?.placeId;
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/MoreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Bookmark, Clock, Calendar, Settings, ArrowRight, StickyNote } from 'lucide-react-native';
import { base, spacing, radii, MIN_TOUCH_TARGET, fontFamily } from '../theme';

Expand All@@ -27,7 +28,7 @@ const MENU_ITEMS: MenuItem[] = [
];

export default function MoreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'MoreMenu'>>();

return (
<SafeAreaView style={styles.container}>
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ParallelPassageScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { View, Text, TouchableOpacity, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getSynopticEntries } from '../db/content';
import { resolveVerseText, parseReference } from '../utils/verseResolver';
import { useSettingsStore } from '../stores';
Expand All@@ -24,7 +25,7 @@ const CATEGORY_LABELS: Record<string, string> = {
};

export default function ParallelPassageScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'ParallelPassage'>>();
const [entries, setEntries] = useState<SynopticEntry[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [catFilter, setCatFilter] = useState<string>('all');
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/components/ChapterSkeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
*/

import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, type ViewStyle, type DimensionValue } from 'react-native';
import Animated, {
useSharedValue,
useAnimatedStyle,
Expand All@@ -17,15 +17,15 @@ import Animated, {
import { base, spacing, radii } from '../theme';

function Bone({ width, height = 14, style }: {
width: number | string;
width: DimensionValue;
height?: number;
style?: any;
style?: ViewStyle;
}) {
return (
<View
style={[
{
width: width as any,
width,
height,
backgroundColor: base.bgSurface,
borderRadius: radii.sm,
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/ScholarInfoSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import { View, Text, TouchableOpacity, Modal, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getScholar } from '../db/content';
import { getScholarColor, base, spacing, radii, fontFamily } from '../theme';
import type { Scholar } from '../types';
import type { Scholar, ScholarBio } from '../types';
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -20,7 +20,7 @@ interface Props {

export function ScholarInfoSheet({ visible, onClose, scholarId, onGoToFullBio }: Props) {
const [scholar, setScholar] = useState<Scholar | null>(null);
const [bio, setBio] = useState<any>(null);
const [bio, setBio] = useState<ScholarBio | null>(null);

useEffect(() => {
if (!scholarId || !visible) return;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/SectionBlock.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { View, StyleSheet } from 'react-native';
import { SectionHeader } from './SectionHeader';
import { VerseBlock } from './VerseBlock';
import { base, spacing } from '../theme';
import type { Section, SectionPanel, Verse, VHLGroup } from '../types';
import type { Section, SectionPanel, Verse, VHLGroup, ParsedRef } from '../types';

interface Props {
section: Section;
Expand All@@ -24,7 +24,7 @@ interface Props {
fontSize?: number;
onPanelToggle: (sectionId: string, panelType: string) => void;
onNotePress?: (verseNum: number) => void;
onRefPress?: (ref: any) => void;
onRefPress?: (ref: ParsedRef) => void;
/** Render prop for button row — injected by parent to avoid circular deps */
renderButtonRow?: (panels: SectionPanel[], sectionId: string) => React.ReactNode;
/** Render prop for active panel content */
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/ThreadViewerSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,12 @@ import { getCrossRefThread } from '../db/content';
import { BadgeChip } from './BadgeChip';
import { base, spacing, radii, fontFamily } from '../theme';
import type { CrossRefThread } from '../types';

interface CrossRefStep {
ref: string;
note?: string;
text?: string;
}
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -24,7 +30,7 @@ interface Props {

export function ThreadViewerSheet({ visible, onClose, threadId, currentBookId, currentChapter, onGoToRef }: Props) {
const [thread, setThread] = useState<CrossRefThread | null>(null);
const [steps, setSteps] = useState<any[]>([]);
const [steps, setSteps] = useState<CrossRefStep[]>([]);

useEffect(() => {
if (!threadId || !visible) return;
Expand Down
13 changes: 7 additions & 6 deletions app/src/components/panels/DebatePanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { DebateEntry } from '../../types';

interface Props { entries: any[]; onScholarPress?: (scholarId: string) => void; }
interface Props { entries: DebateEntry[]; onScholarPress?: (scholarId: string) => void; }

export function DebatePanel({ entries, onScholarPress }: Props) {
const colors = getPanelColors('debate');
Expand All@@ -13,17 +14,17 @@ export function DebatePanel({ entries, onScholarPress }: Props) {
{entries.map((d, i) => {
// Handle both shapes: { topic, positions: [{scholar, position}] }
// and legacy: { title, positions: [{name, proponents, argument}] }
const heading = d.topic ?? d.title ?? 'Debate';
const positions: any[] = d.positions ?? [];
const heading = d.topic ?? 'Debate';
const positions = d.positions ?? [];

return (
<View key={i} style={{ gap: spacing.sm }}>
<Text style={{ color: colors.accent, fontFamily: fontFamily.displayMedium, fontSize: 13 }}>
{heading}
</Text>
{positions.map((p: any, j: number) => {
const label = p.scholar ?? p.name ?? 'Scholar';
const body = p.position ?? p.argument ?? p.proponents ?? '';
{positions.map((p, j: number) => {
const label = p.scholar ?? 'Scholar';
const body = p.position ?? '';
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy debate position keys when rendering

The renderer now reads only p.scholar/p.position, but existing debate data uses legacy position fields like name, argument, and proponents (for example content/proverbs/2.json). Since there is no runtime normalization in the app for these keys, debate rows lose their labels/body text and degrade to placeholder output, which removes substantive chapter content for users.

Useful? React with 👍 / 👎.


return (
<View key={j} style={{ gap: 4, paddingLeft: spacing.sm }}>
Expand Down
12 changes: 5 additions & 7 deletions app/src/components/panels/ReceptionPanel.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@ import React from 'react';
import { View, Text } from 'react-native';
import { TappableReference } from '../TappableReference';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { ParsedRef } from '../../types';
import type { ParsedRef, RecEntry } from '../../types';

interface Props { entries: any[]; onRefPress?: (ref: ParsedRef) => void; }
interface Props { entries: RecEntry[]; onRefPress?: (ref: ParsedRef) => void; }

export function ReceptionPanel({ entries, onRefPress }: Props) {
const colors = getPanelColors('rec');
Expand All@@ -18,11 +18,9 @@ export function ReceptionPanel({ entries, onRefPress }: Props) {

return (
<View style={{ gap: spacing.md }}>
{entries.map((e: any, i: number) => {
// Handle both shapes: { title, quote, note }
// and legacy: { who, text }
const heading = e.title ?? e.who ?? '';
const body = e.quote ?? e.text ?? '';
{entries.map((e, i: number) => {
const heading = e.title ?? '';
const body = e.quote ?? '';
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy who/text keys in ReceptionPanel

This change drops support for the existing legacy reception shape (who/text) and only reads title/quote, so chapters with legacy panel data now render blank entries instead of content. The repository still contains legacy rec entries (for example content/proverbs/2.json), and the content normalizer leaves dict-form rec entries as-is (_tools/shared.py), so this is a real runtime regression for current data rather than just a type-only cleanup.

Useful? React with 👍 / 👎.

const note = e.note ?? '';

return (
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/panels/TranslationPanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { TransPanel } from '../../types';

interface TransRow {
verse_ref?: string;
translations: { version: string; text: string }[];
}

interface Props { data: any; }
interface Props { data: string | TransPanel; }

/**
* Parse legacy HTML table format: <tr><td class="t-label">NIV</td><td>...</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion app/src/hooks/useBookIntro.ts
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { getBookIntro } from '../db/content';
import { safeParse } from '../utils/logger';
import type { ParsedBookIntro } from '../types';

export function useBookIntro(bookId: string | null) {
const [intro, setIntro] = useState<any>(null);
const [intro, setIntro] = useState<ParsedBookIntro | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/navigation/types.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,9 +30,9 @@ export type HomeStackParamList = {

export type ExploreStackParamList = {
ExploreMenu: undefined;
GenealogyTree: undefined;
GenealogyTree: { personId?: string } | undefined;
PersonDetail: { personId: string };
Map: { storyId?: string };
Map: { storyId?: string; placeId?: string };
Timeline: { eventId?: string };
WordStudyBrowse: undefined;
WordStudyDetail: { wordId: string };
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/AllNotesScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Search, X, Plus, Folder, Tag, FileText } from 'lucide-react-native';
import { ScreenHeader } from '../components/ScreenHeader';
import {
Expand DownExpand Up@@ -64,7 +65,7 @@ function parseTags(json: string): string[] {
}

export default function AllNotesScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'AllNotes'>>();
const [activeTab, setActiveTab] = useState<TabKey>('all');

// All tab state
Expand Down
7 changes: 4 additions & 3 deletions app/src/screens/BookIntroScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { BookIntroSection, BookIntroOutlineItem, BookIntroPlanItem } from '../types';
import { useBookIntro } from '../hooks/useBookIntro';
import { ScreenHeader } from '../components/ScreenHeader';
import { LoadingSkeleton } from '../components/LoadingSkeleton';
Expand DownExpand Up@@ -72,7 +73,7 @@ export default function BookIntroScreen() {
)}

{/* Sections */}
{intro.sections?.map((section: any, i: number) => (
{intro.sections?.map((section: BookIntroSection, i: number) => (
<View key={i} style={styles.section}>
{section.heading && (
<Text style={styles.sectionHeading}>{section.heading}</Text>
Expand All@@ -88,7 +89,7 @@ export default function BookIntroScreen() {
{/* Outline (structured list with label + chapters + note) */}
{section.outline && Array.isArray(section.outline) && (
<View style={styles.outlineBlock}>
{section.outline.map((item: any, j: number) => (
{section.outline.map((item: BookIntroOutlineItem, j: number) => (
<View key={j} style={styles.outlineItem}>
<View style={styles.outlineRow}>
<Text style={styles.outlineLabel}>{item.label}</Text>
Expand DownExpand Up@@ -118,7 +119,7 @@ export default function BookIntroScreen() {
{/* Reading Plan (ref + label list) */}
{section.plan && Array.isArray(section.plan) && (
<View style={styles.planBlock}>
{section.plan.map((item: any, j: number) => (
{section.plan.map((item: BookIntroPlanItem, j: number) => (
<View key={j} style={styles.planItem}>
<Text style={styles.planRef}>{item.ref}</Text>
<Text style={styles.planLabel}>{item.label}</Text>
Expand Down
5 changes: 3 additions & 2 deletions app/src/screens/BookListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import React, { useState, useMemo, useRef } from 'react';
import { View, Text, TouchableOpacity, SectionList, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { useBooks, type BookWithProgress } from '../hooks/useBooks';
import { useSettingsStore } from '../stores';
Expand All@@ -36,9 +37,9 @@ const NT_GROUPS = [
];

export default function BookListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'BookList'>>();
const scrollRef = useRef<FlatList>(null);
useScrollToTop(scrollRef as any);
useScrollToTop(scrollRef);

const { books } = useBooks();
const mode = useSettingsStore((s) => s.bookListMode);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/BookmarkListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,15 @@ import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, Alert, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getBookmarks, removeBookmark } from '../db/user';
import { parseVerseRef, displayRef } from '../utils/verseRef';
import { ScreenHeader } from '../components/ScreenHeader';
import { base, spacing, fontFamily } from '../theme';
import type { Bookmark } from '../types';

export default function BookmarkListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'Bookmarks'>>();
const [bookmarks, setBookmarks] = useState<Bookmark[]>([]);

const reload = () => getBookmarks().then(setBookmarks);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ChapterScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import { View, ScrollView, LayoutAnimation, Platform, UIManager, StyleSheet, type NativeSyntheticEvent, type NativeScrollEvent, type GestureResponderEvent } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { Book } from '../types';

import { useChapterData } from '../hooks/useChapterData';
import { useNotedVerses } from '../hooks/useNotedVerses';
Expand DownExpand Up@@ -58,7 +59,7 @@ export default function ChapterScreen() {
const scrollRef = useRef<ScrollView>(null);
const sectionYMap = useRef<Record<string, number>>({});
const btnRowYMap = useRef<Record<string, number>>({});
const [bookData, setBookData] = React.useState<any>(null);
const [bookData, setBookData] = React.useState<Book | null>(null);
const [scrollProgress, setScrollProgress] = useState(0);

// Scroll progress tracking
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ExploreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { base, spacing, radii, fontFamily } from '../theme';

Expand DownExpand Up@@ -70,7 +71,7 @@ const GRID_FEATURES: Feature[] = [
];

export default function ExploreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Explore', 'ExploreMenu'>>();
const scrollRef = useRef<ScrollView>(null);
useScrollToTop(scrollRef);

Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/GenealogyTreeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,12 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';
import { base, spacing } from '../theme';
import type { Person } from '../types';
import type { TreePerson } from '../utils/treeBuilder';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';

export default function GenealogyTreeScreen({ route, navigation }: any) {
export default function GenealogyTreeScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'GenealogyTree'>;
navigation: ScreenNavProp<'Explore', 'GenealogyTree'>;
}) {
useLandscapeUnlock();
const initialPersonId = route?.params?.personId;
const { people, isLoading } = usePeople();
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/HomeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import React, { useState, useCallback, useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, RefreshControl, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { ArrowRight } from 'lucide-react-native';
import { useHomeData } from '../hooks/useHomeData';
Expand All@@ -22,7 +23,7 @@ import { base, spacing, radii, fontFamily } from '../theme';
const TOTAL_BIBLE_CHAPTERS = 1189;

export default function HomeScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Home', 'HomeMain'>>();
const { greeting, subtitle, verse, recentChapters, readingStats, isLoading, refresh } = useHomeData();
const [refreshing, setRefreshing] = useState(false);
const scrollRef = useRef<ScrollView>(null);
Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/MapScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';

import { base, spacing } from '../theme';
import type { MapStory, Place } from '../types';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import { logger } from '../utils/logger';

const INITIAL_REGION = {
Expand All@@ -44,7 +45,10 @@ const INITIAL_REGION = {
longitudeDelta: 30,
};

export default function MapScreen({ route, navigation }: any) {
export default function MapScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'Map'>;
navigation: ScreenNavProp<'Explore', 'Map'>;
}) {
useLandscapeUnlock();
const initialStoryId = route?.params?.storyId;
const initialPlaceId = route?.params?.placeId;
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/MoreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Bookmark, Clock, Calendar, Settings, ArrowRight, StickyNote } from 'lucide-react-native';
import { base, spacing, radii, MIN_TOUCH_TARGET, fontFamily } from '../theme';

Expand All@@ -27,7 +28,7 @@ const MENU_ITEMS: MenuItem[] = [
];

export default function MoreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'MoreMenu'>>();

return (
<SafeAreaView style={styles.container}>
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ParallelPassageScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { View, Text, TouchableOpacity, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getSynopticEntries } from '../db/content';
import { resolveVerseText, parseReference } from '../utils/verseResolver';
import { useSettingsStore } from '../stores';
Expand All@@ -24,7 +25,7 @@ const CATEGORY_LABELS: Record<string, string> = {
};

export default function ParallelPassageScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'ParallelPassage'>>();
const [entries, setEntries] = useState<SynopticEntry[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [catFilter, setCatFilter] = useState<string>('all');
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/components/ChapterSkeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
*/

import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, type ViewStyle, type DimensionValue } from 'react-native';
import Animated, {
useSharedValue,
useAnimatedStyle,
Expand All@@ -17,15 +17,15 @@ import Animated, {
import { base, spacing, radii } from '../theme';

function Bone({ width, height = 14, style }: {
width: number | string;
width: DimensionValue;
height?: number;
style?: any;
style?: ViewStyle;
}) {
return (
<View
style={[
{
width: width as any,
width,
height,
backgroundColor: base.bgSurface,
borderRadius: radii.sm,
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/ScholarInfoSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import { View, Text, TouchableOpacity, Modal, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getScholar } from '../db/content';
import { getScholarColor, base, spacing, radii, fontFamily } from '../theme';
import type { Scholar } from '../types';
import type { Scholar, ScholarBio } from '../types';
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -20,7 +20,7 @@ interface Props {

export function ScholarInfoSheet({ visible, onClose, scholarId, onGoToFullBio }: Props) {
const [scholar, setScholar] = useState<Scholar | null>(null);
const [bio, setBio] = useState<any>(null);
const [bio, setBio] = useState<ScholarBio | null>(null);

useEffect(() => {
if (!scholarId || !visible) return;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/SectionBlock.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { View, StyleSheet } from 'react-native';
import { SectionHeader } from './SectionHeader';
import { VerseBlock } from './VerseBlock';
import { base, spacing } from '../theme';
import type { Section, SectionPanel, Verse, VHLGroup } from '../types';
import type { Section, SectionPanel, Verse, VHLGroup, ParsedRef } from '../types';

interface Props {
section: Section;
Expand All@@ -24,7 +24,7 @@ interface Props {
fontSize?: number;
onPanelToggle: (sectionId: string, panelType: string) => void;
onNotePress?: (verseNum: number) => void;
onRefPress?: (ref: any) => void;
onRefPress?: (ref: ParsedRef) => void;
/** Render prop for button row — injected by parent to avoid circular deps */
renderButtonRow?: (panels: SectionPanel[], sectionId: string) => React.ReactNode;
/** Render prop for active panel content */
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/ThreadViewerSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,12 @@ import { getCrossRefThread } from '../db/content';
import { BadgeChip } from './BadgeChip';
import { base, spacing, radii, fontFamily } from '../theme';
import type { CrossRefThread } from '../types';

interface CrossRefStep {
ref: string;
note?: string;
text?: string;
}
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -24,7 +30,7 @@ interface Props {

export function ThreadViewerSheet({ visible, onClose, threadId, currentBookId, currentChapter, onGoToRef }: Props) {
const [thread, setThread] = useState<CrossRefThread | null>(null);
const [steps, setSteps] = useState<any[]>([]);
const [steps, setSteps] = useState<CrossRefStep[]>([]);

useEffect(() => {
if (!threadId || !visible) return;
Expand Down
13 changes: 7 additions & 6 deletions app/src/components/panels/DebatePanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { DebateEntry } from '../../types';

interface Props { entries: any[]; onScholarPress?: (scholarId: string) => void; }
interface Props { entries: DebateEntry[]; onScholarPress?: (scholarId: string) => void; }

export function DebatePanel({ entries, onScholarPress }: Props) {
const colors = getPanelColors('debate');
Expand All@@ -13,17 +14,17 @@ export function DebatePanel({ entries, onScholarPress }: Props) {
{entries.map((d, i) => {
// Handle both shapes: { topic, positions: [{scholar, position}] }
// and legacy: { title, positions: [{name, proponents, argument}] }
const heading = d.topic ?? d.title ?? 'Debate';
const positions: any[] = d.positions ?? [];
const heading = d.topic ?? 'Debate';
const positions = d.positions ?? [];

return (
<View key={i} style={{ gap: spacing.sm }}>
<Text style={{ color: colors.accent, fontFamily: fontFamily.displayMedium, fontSize: 13 }}>
{heading}
</Text>
{positions.map((p: any, j: number) => {
const label = p.scholar ?? p.name ?? 'Scholar';
const body = p.position ?? p.argument ?? p.proponents ?? '';
{positions.map((p, j: number) => {
const label = p.scholar ?? 'Scholar';
const body = p.position ?? '';
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy debate position keys when rendering

The renderer now reads only p.scholar/p.position, but existing debate data uses legacy position fields like name, argument, and proponents (for example content/proverbs/2.json). Since there is no runtime normalization in the app for these keys, debate rows lose their labels/body text and degrade to placeholder output, which removes substantive chapter content for users.

Useful? React with 👍 / 👎.


return (
<View key={j} style={{ gap: 4, paddingLeft: spacing.sm }}>
Expand Down
12 changes: 5 additions & 7 deletions app/src/components/panels/ReceptionPanel.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@ import React from 'react';
import { View, Text } from 'react-native';
import { TappableReference } from '../TappableReference';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { ParsedRef } from '../../types';
import type { ParsedRef, RecEntry } from '../../types';

interface Props { entries: any[]; onRefPress?: (ref: ParsedRef) => void; }
interface Props { entries: RecEntry[]; onRefPress?: (ref: ParsedRef) => void; }

export function ReceptionPanel({ entries, onRefPress }: Props) {
const colors = getPanelColors('rec');
Expand All@@ -18,11 +18,9 @@ export function ReceptionPanel({ entries, onRefPress }: Props) {

return (
<View style={{ gap: spacing.md }}>
{entries.map((e: any, i: number) => {
// Handle both shapes: { title, quote, note }
// and legacy: { who, text }
const heading = e.title ?? e.who ?? '';
const body = e.quote ?? e.text ?? '';
{entries.map((e, i: number) => {
const heading = e.title ?? '';
const body = e.quote ?? '';
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy who/text keys in ReceptionPanel

This change drops support for the existing legacy reception shape (who/text) and only reads title/quote, so chapters with legacy panel data now render blank entries instead of content. The repository still contains legacy rec entries (for example content/proverbs/2.json), and the content normalizer leaves dict-form rec entries as-is (_tools/shared.py), so this is a real runtime regression for current data rather than just a type-only cleanup.

Useful? React with 👍 / 👎.

const note = e.note ?? '';

return (
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/panels/TranslationPanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { TransPanel } from '../../types';

interface TransRow {
verse_ref?: string;
translations: { version: string; text: string }[];
}

interface Props { data: any; }
interface Props { data: string | TransPanel; }

/**
* Parse legacy HTML table format: <tr><td class="t-label">NIV</td><td>...</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion app/src/hooks/useBookIntro.ts
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { getBookIntro } from '../db/content';
import { safeParse } from '../utils/logger';
import type { ParsedBookIntro } from '../types';

export function useBookIntro(bookId: string | null) {
const [intro, setIntro] = useState<any>(null);
const [intro, setIntro] = useState<ParsedBookIntro | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/navigation/types.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,9 +30,9 @@ export type HomeStackParamList = {

export type ExploreStackParamList = {
ExploreMenu: undefined;
GenealogyTree: undefined;
GenealogyTree: { personId?: string } | undefined;
PersonDetail: { personId: string };
Map: { storyId?: string };
Map: { storyId?: string; placeId?: string };
Timeline: { eventId?: string };
WordStudyBrowse: undefined;
WordStudyDetail: { wordId: string };
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/AllNotesScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Search, X, Plus, Folder, Tag, FileText } from 'lucide-react-native';
import { ScreenHeader } from '../components/ScreenHeader';
import {
Expand DownExpand Up@@ -64,7 +65,7 @@ function parseTags(json: string): string[] {
}

export default function AllNotesScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'AllNotes'>>();
const [activeTab, setActiveTab] = useState<TabKey>('all');

// All tab state
Expand Down
7 changes: 4 additions & 3 deletions app/src/screens/BookIntroScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { BookIntroSection, BookIntroOutlineItem, BookIntroPlanItem } from '../types';
import { useBookIntro } from '../hooks/useBookIntro';
import { ScreenHeader } from '../components/ScreenHeader';
import { LoadingSkeleton } from '../components/LoadingSkeleton';
Expand DownExpand Up@@ -72,7 +73,7 @@ export default function BookIntroScreen() {
)}

{/* Sections */}
{intro.sections?.map((section: any, i: number) => (
{intro.sections?.map((section: BookIntroSection, i: number) => (
<View key={i} style={styles.section}>
{section.heading && (
<Text style={styles.sectionHeading}>{section.heading}</Text>
Expand All@@ -88,7 +89,7 @@ export default function BookIntroScreen() {
{/* Outline (structured list with label + chapters + note) */}
{section.outline && Array.isArray(section.outline) && (
<View style={styles.outlineBlock}>
{section.outline.map((item: any, j: number) => (
{section.outline.map((item: BookIntroOutlineItem, j: number) => (
<View key={j} style={styles.outlineItem}>
<View style={styles.outlineRow}>
<Text style={styles.outlineLabel}>{item.label}</Text>
Expand DownExpand Up@@ -118,7 +119,7 @@ export default function BookIntroScreen() {
{/* Reading Plan (ref + label list) */}
{section.plan && Array.isArray(section.plan) && (
<View style={styles.planBlock}>
{section.plan.map((item: any, j: number) => (
{section.plan.map((item: BookIntroPlanItem, j: number) => (
<View key={j} style={styles.planItem}>
<Text style={styles.planRef}>{item.ref}</Text>
<Text style={styles.planLabel}>{item.label}</Text>
Expand Down
5 changes: 3 additions & 2 deletions app/src/screens/BookListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import React, { useState, useMemo, useRef } from 'react';
import { View, Text, TouchableOpacity, SectionList, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { useBooks, type BookWithProgress } from '../hooks/useBooks';
import { useSettingsStore } from '../stores';
Expand All@@ -36,9 +37,9 @@ const NT_GROUPS = [
];

export default function BookListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'BookList'>>();
const scrollRef = useRef<FlatList>(null);
useScrollToTop(scrollRef as any);
useScrollToTop(scrollRef);

const { books } = useBooks();
const mode = useSettingsStore((s) => s.bookListMode);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/BookmarkListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,15 @@ import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, Alert, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getBookmarks, removeBookmark } from '../db/user';
import { parseVerseRef, displayRef } from '../utils/verseRef';
import { ScreenHeader } from '../components/ScreenHeader';
import { base, spacing, fontFamily } from '../theme';
import type { Bookmark } from '../types';

export default function BookmarkListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'Bookmarks'>>();
const [bookmarks, setBookmarks] = useState<Bookmark[]>([]);

const reload = () => getBookmarks().then(setBookmarks);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ChapterScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import { View, ScrollView, LayoutAnimation, Platform, UIManager, StyleSheet, type NativeSyntheticEvent, type NativeScrollEvent, type GestureResponderEvent } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { Book } from '../types';

import { useChapterData } from '../hooks/useChapterData';
import { useNotedVerses } from '../hooks/useNotedVerses';
Expand DownExpand Up@@ -58,7 +59,7 @@ export default function ChapterScreen() {
const scrollRef = useRef<ScrollView>(null);
const sectionYMap = useRef<Record<string, number>>({});
const btnRowYMap = useRef<Record<string, number>>({});
const [bookData, setBookData] = React.useState<any>(null);
const [bookData, setBookData] = React.useState<Book | null>(null);
const [scrollProgress, setScrollProgress] = useState(0);

// Scroll progress tracking
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ExploreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { base, spacing, radii, fontFamily } from '../theme';

Expand DownExpand Up@@ -70,7 +71,7 @@ const GRID_FEATURES: Feature[] = [
];

export default function ExploreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Explore', 'ExploreMenu'>>();
const scrollRef = useRef<ScrollView>(null);
useScrollToTop(scrollRef);

Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/GenealogyTreeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,12 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';
import { base, spacing } from '../theme';
import type { Person } from '../types';
import type { TreePerson } from '../utils/treeBuilder';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';

export default function GenealogyTreeScreen({ route, navigation }: any) {
export default function GenealogyTreeScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'GenealogyTree'>;
navigation: ScreenNavProp<'Explore', 'GenealogyTree'>;
}) {
useLandscapeUnlock();
const initialPersonId = route?.params?.personId;
const { people, isLoading } = usePeople();
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/HomeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import React, { useState, useCallback, useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, RefreshControl, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { ArrowRight } from 'lucide-react-native';
import { useHomeData } from '../hooks/useHomeData';
Expand All@@ -22,7 +23,7 @@ import { base, spacing, radii, fontFamily } from '../theme';
const TOTAL_BIBLE_CHAPTERS = 1189;

export default function HomeScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Home', 'HomeMain'>>();
const { greeting, subtitle, verse, recentChapters, readingStats, isLoading, refresh } = useHomeData();
const [refreshing, setRefreshing] = useState(false);
const scrollRef = useRef<ScrollView>(null);
Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/MapScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';

import { base, spacing } from '../theme';
import type { MapStory, Place } from '../types';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import { logger } from '../utils/logger';

const INITIAL_REGION = {
Expand All@@ -44,7 +45,10 @@ const INITIAL_REGION = {
longitudeDelta: 30,
};

export default function MapScreen({ route, navigation }: any) {
export default function MapScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'Map'>;
navigation: ScreenNavProp<'Explore', 'Map'>;
}) {
useLandscapeUnlock();
const initialStoryId = route?.params?.storyId;
const initialPlaceId = route?.params?.placeId;
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/MoreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Bookmark, Clock, Calendar, Settings, ArrowRight, StickyNote } from 'lucide-react-native';
import { base, spacing, radii, MIN_TOUCH_TARGET, fontFamily } from '../theme';

Expand All@@ -27,7 +28,7 @@ const MENU_ITEMS: MenuItem[] = [
];

export default function MoreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'MoreMenu'>>();

return (
<SafeAreaView style={styles.container}>
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ParallelPassageScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { View, Text, TouchableOpacity, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getSynopticEntries } from '../db/content';
import { resolveVerseText, parseReference } from '../utils/verseResolver';
import { useSettingsStore } from '../stores';
Expand All@@ -24,7 +25,7 @@ const CATEGORY_LABELS: Record<string, string> = {
};

export default function ParallelPassageScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'ParallelPassage'>>();
const [entries, setEntries] = useState<SynopticEntry[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [catFilter, setCatFilter] = useState<string>('all');
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/components/ChapterSkeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
*/

import React, { useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, type ViewStyle, type DimensionValue } from 'react-native';
import Animated, {
useSharedValue,
useAnimatedStyle,
Expand All@@ -17,15 +17,15 @@ import Animated, {
import { base, spacing, radii } from '../theme';

function Bone({ width, height = 14, style }: {
width: number | string;
width: DimensionValue;
height?: number;
style?: any;
style?: ViewStyle;
}) {
return (
<View
style={[
{
width: width as any,
width,
height,
backgroundColor: base.bgSurface,
borderRadius: radii.sm,
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/ScholarInfoSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import { View, Text, TouchableOpacity, Modal, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getScholar } from '../db/content';
import { getScholarColor, base, spacing, radii, fontFamily } from '../theme';
import type { Scholar } from '../types';
import type { Scholar, ScholarBio } from '../types';
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -20,7 +20,7 @@ interface Props {

export function ScholarInfoSheet({ visible, onClose, scholarId, onGoToFullBio }: Props) {
const [scholar, setScholar] = useState<Scholar | null>(null);
const [bio, setBio] = useState<any>(null);
const [bio, setBio] = useState<ScholarBio | null>(null);

useEffect(() => {
if (!scholarId || !visible) return;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/SectionBlock.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { View, StyleSheet } from 'react-native';
import { SectionHeader } from './SectionHeader';
import { VerseBlock } from './VerseBlock';
import { base, spacing } from '../theme';
import type { Section, SectionPanel, Verse, VHLGroup } from '../types';
import type { Section, SectionPanel, Verse, VHLGroup, ParsedRef } from '../types';

interface Props {
section: Section;
Expand All@@ -24,7 +24,7 @@ interface Props {
fontSize?: number;
onPanelToggle: (sectionId: string, panelType: string) => void;
onNotePress?: (verseNum: number) => void;
onRefPress?: (ref: any) => void;
onRefPress?: (ref: ParsedRef) => void;
/** Render prop for button row — injected by parent to avoid circular deps */
renderButtonRow?: (panels: SectionPanel[], sectionId: string) => React.ReactNode;
/** Render prop for active panel content */
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/ThreadViewerSheet.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,12 @@ import { getCrossRefThread } from '../db/content';
import { BadgeChip } from './BadgeChip';
import { base, spacing, radii, fontFamily } from '../theme';
import type { CrossRefThread } from '../types';

interface CrossRefStep {
ref: string;
note?: string;
text?: string;
}
import { logger } from '../utils/logger';

interface Props {
Expand All@@ -24,7 +30,7 @@ interface Props {

export function ThreadViewerSheet({ visible, onClose, threadId, currentBookId, currentChapter, onGoToRef }: Props) {
const [thread, setThread] = useState<CrossRefThread | null>(null);
const [steps, setSteps] = useState<any[]>([]);
const [steps, setSteps] = useState<CrossRefStep[]>([]);

useEffect(() => {
if (!threadId || !visible) return;
Expand Down
13 changes: 7 additions & 6 deletions app/src/components/panels/DebatePanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { DebateEntry } from '../../types';

interface Props { entries: any[]; onScholarPress?: (scholarId: string) => void; }
interface Props { entries: DebateEntry[]; onScholarPress?: (scholarId: string) => void; }

export function DebatePanel({ entries, onScholarPress }: Props) {
const colors = getPanelColors('debate');
Expand All@@ -13,17 +14,17 @@ export function DebatePanel({ entries, onScholarPress }: Props) {
{entries.map((d, i) => {
// Handle both shapes: { topic, positions: [{scholar, position}] }
// and legacy: { title, positions: [{name, proponents, argument}] }
const heading = d.topic ?? d.title ?? 'Debate';
const positions: any[] = d.positions ?? [];
const heading = d.topic ?? 'Debate';
const positions = d.positions ?? [];

return (
<View key={i} style={{ gap: spacing.sm }}>
<Text style={{ color: colors.accent, fontFamily: fontFamily.displayMedium, fontSize: 13 }}>
{heading}
</Text>
{positions.map((p: any, j: number) => {
const label = p.scholar ?? p.name ?? 'Scholar';
const body = p.position ?? p.argument ?? p.proponents ?? '';
{positions.map((p, j: number) => {
const label = p.scholar ?? 'Scholar';
const body = p.position ?? '';
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy debate position keys when rendering

The renderer now reads only p.scholar/p.position, but existing debate data uses legacy position fields like name, argument, and proponents (for example content/proverbs/2.json). Since there is no runtime normalization in the app for these keys, debate rows lose their labels/body text and degrade to placeholder output, which removes substantive chapter content for users.

Useful? React with 👍 / 👎.


return (
<View key={j} style={{ gap: 4, paddingLeft: spacing.sm }}>
Expand Down
12 changes: 5 additions & 7 deletions app/src/components/panels/ReceptionPanel.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@ import React from 'react';
import { View, Text } from 'react-native';
import { TappableReference } from '../TappableReference';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { ParsedRef } from '../../types';
import type { ParsedRef, RecEntry } from '../../types';

interface Props { entries: any[]; onRefPress?: (ref: ParsedRef) => void; }
interface Props { entries: RecEntry[]; onRefPress?: (ref: ParsedRef) => void; }

export function ReceptionPanel({ entries, onRefPress }: Props) {
const colors = getPanelColors('rec');
Expand All@@ -18,11 +18,9 @@ export function ReceptionPanel({ entries, onRefPress }: Props) {

return (
<View style={{ gap: spacing.md }}>
{entries.map((e: any, i: number) => {
// Handle both shapes: { title, quote, note }
// and legacy: { who, text }
const heading = e.title ?? e.who ?? '';
const body = e.quote ?? e.text ?? '';
{entries.map((e, i: number) => {
const heading = e.title ?? '';
const body = e.quote ?? '';
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy who/text keys in ReceptionPanel

This change drops support for the existing legacy reception shape (who/text) and only reads title/quote, so chapters with legacy panel data now render blank entries instead of content. The repository still contains legacy rec entries (for example content/proverbs/2.json), and the content normalizer leaves dict-form rec entries as-is (_tools/shared.py), so this is a real runtime regression for current data rather than just a type-only cleanup.

Useful? React with 👍 / 👎.

const note = e.note ?? '';

return (
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/panels/TranslationPanel.tsx
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { View, Text } from 'react-native';
import { getPanelColors, base, spacing, fontFamily } from '../../theme';
import type { TransPanel } from '../../types';

interface TransRow {
verse_ref?: string;
translations: { version: string; text: string }[];
}

interface Props { data: any; }
interface Props { data: string | TransPanel; }

/**
* Parse legacy HTML table format: <tr><td class="t-label">NIV</td><td>...</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion app/src/hooks/useBookIntro.ts
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { getBookIntro } from '../db/content';
import { safeParse } from '../utils/logger';
import type { ParsedBookIntro } from '../types';

export function useBookIntro(bookId: string | null) {
const [intro, setIntro] = useState<any>(null);
const [intro, setIntro] = useState<ParsedBookIntro | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/navigation/types.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,9 +30,9 @@ export type HomeStackParamList = {

export type ExploreStackParamList = {
ExploreMenu: undefined;
GenealogyTree: undefined;
GenealogyTree: { personId?: string } | undefined;
PersonDetail: { personId: string };
Map: { storyId?: string };
Map: { storyId?: string; placeId?: string };
Timeline: { eventId?: string };
WordStudyBrowse: undefined;
WordStudyDetail: { wordId: string };
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/AllNotesScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Search, X, Plus, Folder, Tag, FileText } from 'lucide-react-native';
import { ScreenHeader } from '../components/ScreenHeader';
import {
Expand DownExpand Up@@ -64,7 +65,7 @@ function parseTags(json: string): string[] {
}

export default function AllNotesScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'AllNotes'>>();
const [activeTab, setActiveTab] = useState<TabKey>('all');

// All tab state
Expand Down
7 changes: 4 additions & 3 deletions app/src/screens/BookIntroScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { BookIntroSection, BookIntroOutlineItem, BookIntroPlanItem } from '../types';
import { useBookIntro } from '../hooks/useBookIntro';
import { ScreenHeader } from '../components/ScreenHeader';
import { LoadingSkeleton } from '../components/LoadingSkeleton';
Expand DownExpand Up@@ -72,7 +73,7 @@ export default function BookIntroScreen() {
)}

{/* Sections */}
{intro.sections?.map((section: any, i: number) => (
{intro.sections?.map((section: BookIntroSection, i: number) => (
<View key={i} style={styles.section}>
{section.heading && (
<Text style={styles.sectionHeading}>{section.heading}</Text>
Expand All@@ -88,7 +89,7 @@ export default function BookIntroScreen() {
{/* Outline (structured list with label + chapters + note) */}
{section.outline && Array.isArray(section.outline) && (
<View style={styles.outlineBlock}>
{section.outline.map((item: any, j: number) => (
{section.outline.map((item: BookIntroOutlineItem, j: number) => (
<View key={j} style={styles.outlineItem}>
<View style={styles.outlineRow}>
<Text style={styles.outlineLabel}>{item.label}</Text>
Expand DownExpand Up@@ -118,7 +119,7 @@ export default function BookIntroScreen() {
{/* Reading Plan (ref + label list) */}
{section.plan && Array.isArray(section.plan) && (
<View style={styles.planBlock}>
{section.plan.map((item: any, j: number) => (
{section.plan.map((item: BookIntroPlanItem, j: number) => (
<View key={j} style={styles.planItem}>
<Text style={styles.planRef}>{item.ref}</Text>
<Text style={styles.planLabel}>{item.label}</Text>
Expand Down
5 changes: 3 additions & 2 deletions app/src/screens/BookListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import React, { useState, useMemo, useRef } from 'react';
import { View, Text, TouchableOpacity, SectionList, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { useBooks, type BookWithProgress } from '../hooks/useBooks';
import { useSettingsStore } from '../stores';
Expand All@@ -36,9 +37,9 @@ const NT_GROUPS = [
];

export default function BookListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'BookList'>>();
const scrollRef = useRef<FlatList>(null);
useScrollToTop(scrollRef as any);
useScrollToTop(scrollRef);

const { books } = useBooks();
const mode = useSettingsStore((s) => s.bookListMode);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/BookmarkListScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,15 @@ import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, Alert, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getBookmarks, removeBookmark } from '../db/user';
import { parseVerseRef, displayRef } from '../utils/verseRef';
import { ScreenHeader } from '../components/ScreenHeader';
import { base, spacing, fontFamily } from '../theme';
import type { Bookmark } from '../types';

export default function BookmarkListScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'Bookmarks'>>();
const [bookmarks, setBookmarks] = useState<Bookmark[]>([]);

const reload = () => getBookmarks().then(setBookmarks);
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ChapterScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import { View, ScrollView, LayoutAnimation, Platform, UIManager, StyleSheet, type NativeSyntheticEvent, type NativeScrollEvent, type GestureResponderEvent } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import type { Book } from '../types';

import { useChapterData } from '../hooks/useChapterData';
import { useNotedVerses } from '../hooks/useNotedVerses';
Expand DownExpand Up@@ -58,7 +59,7 @@ export default function ChapterScreen() {
const scrollRef = useRef<ScrollView>(null);
const sectionYMap = useRef<Record<string, number>>({});
const btnRowYMap = useRef<Record<string, number>>({});
const [bookData, setBookData] = React.useState<any>(null);
const [bookData, setBookData] = React.useState<Book | null>(null);
const [scrollProgress, setScrollProgress] = useState(0);

// Scroll progress tracking
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ExploreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { base, spacing, radii, fontFamily } from '../theme';

Expand DownExpand Up@@ -70,7 +71,7 @@ const GRID_FEATURES: Feature[] = [
];

export default function ExploreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Explore', 'ExploreMenu'>>();
const scrollRef = useRef<ScrollView>(null);
useScrollToTop(scrollRef);

Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/GenealogyTreeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,12 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';
import { base, spacing } from '../theme';
import type { Person } from '../types';
import type { TreePerson } from '../utils/treeBuilder';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';

export default function GenealogyTreeScreen({ route, navigation }: any) {
export default function GenealogyTreeScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'GenealogyTree'>;
navigation: ScreenNavProp<'Explore', 'GenealogyTree'>;
}) {
useLandscapeUnlock();
const initialPersonId = route?.params?.personId;
const { people, isLoading } = usePeople();
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/HomeScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import React, { useState, useCallback, useRef } from 'react';
import { View, Text, TouchableOpacity, ScrollView, RefreshControl, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { useScrollToTop } from '@react-navigation/native';
import { ArrowRight } from 'lucide-react-native';
import { useHomeData } from '../hooks/useHomeData';
Expand All@@ -22,7 +23,7 @@ import { base, spacing, radii, fontFamily } from '../theme';
const TOTAL_BIBLE_CHAPTERS = 1189;

export default function HomeScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Home', 'HomeMain'>>();
const { greeting, subtitle, verse, recentChapters, readingStats, isLoading, refresh } = useHomeData();
const [refreshing, setRefreshing] = useState(false);
const scrollRef = useRef<ScrollView>(null);
Expand Down
6 changes: 5 additions & 1 deletion app/src/screens/MapScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { LoadingSkeleton } from '../components/LoadingSkeleton';

import { base, spacing } from '../theme';
import type { MapStory, Place } from '../types';
import type { ScreenNavProp, ScreenRouteProp } from '../navigation/types';
import { logger } from '../utils/logger';

const INITIAL_REGION = {
Expand All@@ -44,7 +45,10 @@ const INITIAL_REGION = {
longitudeDelta: 30,
};

export default function MapScreen({ route, navigation }: any) {
export default function MapScreen({ route, navigation }: {
route: ScreenRouteProp<'Explore', 'Map'>;
navigation: ScreenNavProp<'Explore', 'Map'>;
}) {
useLandscapeUnlock();
const initialStoryId = route?.params?.storyId;
const initialPlaceId = route?.params?.placeId;
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/MoreMenuScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { Bookmark, Clock, Calendar, Settings, ArrowRight, StickyNote } from 'lucide-react-native';
import { base, spacing, radii, MIN_TOUCH_TARGET, fontFamily } from '../theme';

Expand All@@ -27,7 +28,7 @@ const MENU_ITEMS: MenuItem[] = [
];

export default function MoreMenuScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'More', 'MoreMenu'>>();

return (
<SafeAreaView style={styles.container}>
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/ParallelPassageScreen.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { View, Text, TouchableOpacity, FlatList, ScrollView, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useNavigation } from '@react-navigation/native';
import type { ScreenNavProp } from '../navigation/types';
import { getSynopticEntries } from '../db/content';
import { resolveVerseText, parseReference } from '../utils/verseResolver';
import { useSettingsStore } from '../stores';
Expand All@@ -24,7 +25,7 @@ const CATEGORY_LABELS: Record<string, string> = {
};

export default function ParallelPassageScreen() {
const navigation = useNavigation<any>();
const navigation = useNavigation<ScreenNavProp<'Read', 'ParallelPassage'>>();
const [entries, setEntries] = useState<SynopticEntry[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [catFilter, setCatFilter] = useState<string>('all');
Expand Down
Loading