Skip to content

Feat: Apply AI#19

Merged
Astersa merged 1 commit into
mainfrom
feat/apply-AI-chatbox
Mar 15, 2026
Merged

Feat: Apply AI#19
Astersa merged 1 commit into
mainfrom
feat/apply-AI-chatbox

Conversation

@Astersa

@Astersa Astersa commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@Astersa Astersa requested a review from Copilot March 15, 2026 08:18
@Astersa

Astersa commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot

Copilot AI commented Mar 15, 2026

Copy link
Copy Markdown

@Astersa I've opened a new pull request, #20, to work on those changes. Once the pull request is ready, I'll request review from you.

@Astersa Astersa merged commit f5dea1c into main Mar 15, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an in-reader AI chatbot feature that calls a new authenticated backend endpoint and surfaces the UI from the chapter reading screen, with supporting navigation and i18n strings.

Changes:

  • Added ReaderChatbot modal UI and a floating action button (FAB) on the chapter reader screen to open it.
  • Added an authenticated askReaderChatbot API call and a new endpoints.readerChatbot(comicId) endpoint helper.
  • Updated navigation to allow routing to Profile for login, plus added EN/VI i18n strings for the chatbot and adjusted some EN login-required copy.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/services/api/endpoints.js Adds readerChatbot(comicId) endpoint helper.
src/navigation/AppNavigator.jsx Adds Profile as a stack screen to support navigation from the chatbot login prompt.
src/i18n/locales/vi.js Adds Vietnamese strings for story.chatbot.*.
src/i18n/locales/en.js Adds English strings for story.chatbot.* and modifies login-required copy.
src/features/chapters/reader/ReaderChatbot.jsx New chatbot modal component (messages, samples, login gate, send flow).
src/features/chapters/api.js Adds askReaderChatbot POST call using authenticated axios config.
src/app/story/chapter/[id].jsx Adds FAB + modal wiring to open ReaderChatbot from chapter reader.
src/app/(tabs)/profile.jsx Adds goBack behavior after login when navigated from chatbot.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +90 to +93
contentContainerStyle={[
styles.bodyContent,
!isAuthenticated
]}

useEffect(() => {
if (messages.length > 0) {
setTimeout(() => scrollRef.current?.scrollToEnd({ animated: true }), 100);
Comment on lines +58 to +59
vi: t('story.chatbot.errorMessage'),
en: t('story.chatbot.errorMessage'),
Comment on lines +20 to +26
export function ReaderChatbot({ visible, onClose, comicId, currentChapterNumber }) {
const { colors, language } = useSettings();
const { isAuthenticated } = useAuth();
const { t } = useTranslation();
const styles = makeStyles(colors);
const navigation = useNavigation();

Comment thread src/i18n/locales/en.js
Comment on lines +59 to 63
loginRequired: 'Sign in to have this feature',
loginRequiredPrefix: '',
loginRequiredLink: 'Sign in',
loginRequiredSuffix: ' to see this feature',
loginRequiredSuffix: ' to have this feature',
noHistory: 'No reading history yet',
Comment thread src/i18n/locales/en.js
Comment on lines 85 to 92
loading: 'Loading favorites...',
loginRequired: 'Sign in to see your followed comics.',
loginRequired: 'Sign in to have this feature',
empty: "You haven't followed any comics yet.",
},
history: {
loading: 'Loading history...',
loginRequired: 'Sign in to see your reading history.',
loginRequired: 'Sign in to have this feature',
empty: 'Your history is empty.',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants