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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ jobs:
fi
}

report_blocking "Lint (web + convex)" "${{ steps.lint.outcome }}"
report_blocking "Typecheck (web + convex)" "${{ steps.typecheck.outcome }}"
report_blocking "Lint" "${{ steps.lint.outcome }}"
report_blocking "Typecheck" "${{ steps.typecheck.outcome }}"
report_blocking "Convex raw auth guard" "${{ steps.convex_auth_guard.outcome }}"
report_warning "Convex validator any guard" "${{ steps.convex_any_guard.outcome }}"
report_blocking "Secret scan gate" "${{ steps.secret_scan.outcome }}"
Expand Down
12 changes: 6 additions & 6 deletions apps/widget/src/components/ConversationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function ConversationView({
return sessionStorage.getItem("opencom_email_dismissed") === "true";
});
const [emailCapturedThisSession, setEmailCapturedThisSession] = useState(false);
const [hasVisitorSentMessage, setHasVisitorSentMessage] = useState(false);
// const [hasVisitorSentMessage, setHasVisitorSentMessage] = useState(false);
const [lastAgentMessageCount, setLastAgentMessageCount] = useState(0);
const [emailInput, setEmailInput] = useState("");
const [showArticleSuggestions, setShowArticleSuggestions] = useState(false);
Expand Down Expand Up @@ -157,7 +157,7 @@ export function ConversationView({
setShowEmailCapture(false);
return;
}
if (!hasVisitorSentMessage) return;
// if (!hasVisitorSentMessage) return;
Comment thread
djanogly marked this conversation as resolved.
if (!automationSettings?.collectEmailEnabled) return;

Comment thread
djanogly marked this conversation as resolved.
const agentCount = agentMessageCount;
Expand All @@ -175,7 +175,7 @@ export function ConversationView({
}, [
visitorId,
isVisitorAlreadyIdentified,
hasVisitorSentMessage,
// hasVisitorSentMessage,
agentMessageCount,
emailCapturedOrDismissed,
lastAgentMessageCount,
Expand Down Expand Up @@ -205,9 +205,9 @@ export function ConversationView({
visitorId,
sessionToken: sessionTokenRef.current ?? undefined,
});
if (!hasVisitorSentMessage) {
setHasVisitorSentMessage(true);
}
// if (!hasVisitorSentMessage) {
// setHasVisitorSentMessage(true);
// }

if (aiSettings?.enabled !== false) {
setIsAiTyping(true);
Expand Down
6 changes: 3 additions & 3 deletions apps/widget/src/components/conversationView/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function ConversationFooter({
emailInput,
onEmailInputChange,
onEmailSubmit,
onEmailDismiss,
// onEmailDismiss,
officeHoursStatus,
expectedReplyTime,
commonIssueButtons,
Expand Down Expand Up @@ -127,9 +127,9 @@ export function ConversationFooter({
Save
</button>
</div>
<button onClick={onEmailDismiss} className="opencom-email-skip" type="button">
{/* <button onClick={onEmailDismiss} className="opencom-email-skip" type="button">
Skip
</button>
</button> */}
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
Comment on lines +130 to +132
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Email prompt undismissable 🐞 Bug ✓ Correctness

The UI no longer renders any control that calls handleEmailDismiss, so users cannot dismiss email
capture without submitting an email and the opencom_email_dismissed mechanism becomes unreachable.
This can leave the email capture permanently visible for users who don’t want to provide an email.
Agent Prompt
### Issue description
Email capture can no longer be dismissed because the Footer UI no longer calls `onEmailDismiss`, even though ConversationView still implements dismissal behavior.

### Issue Context
`handleEmailDismiss` persists a dismissal flag in sessionStorage (`opencom_email_dismissed`). With the Skip button removed, that path is unreachable from the UI.

### Fix Focus Areas
- apps/widget/src/components/conversationView/Footer.tsx[96-134]
- apps/widget/src/components/ConversationView.tsx[252-283]
- apps/widget/src/components/ConversationView.tsx[32-41]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread
djanogly marked this conversation as resolved.
Comment thread
djanogly marked this conversation as resolved.
</div>
)}

Expand Down
11 changes: 5 additions & 6 deletions apps/widget/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
.opencom-messages {
flex: 1;
overflow-y: auto;
padding: 16px;
padding: 16px 16px 0;
display: flex;
flex-direction: column;
gap: 12px;
Expand Down Expand Up @@ -431,7 +431,6 @@
background: var(--opencom-bg-surface);
display: flex;
flex-direction: column;
gap: 8px;
}

.opencom-conversation-status {
Expand All @@ -456,7 +455,7 @@
}

.opencom-input-container {
padding: 12px 16px 16px;
padding: 10px;
display: flex;
gap: 8px;
background: var(--opencom-bg-surface);
Expand Down Expand Up @@ -1018,7 +1017,7 @@
}

.opencom-email-capture {
padding: 12px 16px;
padding: 8px 10px;
background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%);
border-top: 1px solid #c4b5fd;
animation: slideInUp 0.3s ease-out;
Expand Down Expand Up @@ -1881,9 +1880,9 @@
max-width: 85%;
}

.opencom-email-capture {
/* .opencom-email-capture {
padding: 14px 16px;
}
} */
Comment thread
djanogly marked this conversation as resolved.

.opencom-email-input {
padding: 10px 14px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function ConversationDetailView({
onEmailChange,
showEmailCapture,
onEmailSubmit,
onEmailDismiss,
// onEmailDismiss,
isValidEmail,
flatListRef,
}: ConversationDetailViewProps) {
Expand Down Expand Up @@ -139,9 +139,9 @@ export function ConversationDetailView({
</Text>
</TouchableOpacity>
</View>
<TouchableOpacity onPress={onEmailDismiss} style={messengerStyles.emailSkipButton}>
{/* <TouchableOpacity onPress={onEmailDismiss} style={messengerStyles.emailSkipButton}>
<Text style={[messengerStyles.emailSkipText, { color: theme.textMuted }]}>Skip</Text>
</TouchableOpacity>
</TouchableOpacity> */}
Comment thread
djanogly marked this conversation as resolved.
</View>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ export function evaluateEmailCaptureDecision(
if (!input.visitorId || input.emailCaptured) {
return null;
}
if (!input.hasVisitorSentMessage || !input.collectEmailEnabled) {
if (
// !input.hasVisitorSentMessage ||
!input.collectEmailEnabled
) {
Comment thread
djanogly marked this conversation as resolved.
return null;
}

Expand Down
Loading