Skip to content

chore(stage-ui,stage-web,stage-tamagotchi): add ph-no-capture to chat messages#833

Merged
nekomeowww merged 2 commits into
mainfrom
sr/posthog-privacy
Dec 27, 2025
Merged

chore(stage-ui,stage-web,stage-tamagotchi): add ph-no-capture to chat messages#833
nekomeowww merged 2 commits into
mainfrom
sr/posthog-privacy

Conversation

@shinohara-rin
Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shinohara-rin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces the ph-no-capture class to various chat-related components across the stage-ui, stage-web, and stage-tamagotchi applications. The primary goal is to ensure that specific UI elements, particularly those displaying or inputting chat messages, are excluded from automated capture processes, enhancing privacy or preventing unintended data collection.

Highlights

  • Chat Message Input: The BasicTextarea component used for message input in stage-tamagotchi now includes the ph-no-capture class.
  • Chat Area Container: The main container div for the chat area in stage-web has been updated to include the ph-no-capture class.
  • Chat Assistant and User Items: Both ChatAssistantItem.vue and ChatUserItem.vue components in stage-ui now apply the ph-no-capture class to their main container div elements.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 26, 2025

⏳ Approval required for deploying to Cloudflare Workers (Preview) for stage-web.

Name Link
🔭 Waiting for approval For maintainers, approve here

Hey, @nekomeowww, @sumimakito, @luoling8192, @LemonNekoGH, kindly take some time to review and approve this deployment when you are available. Thank you! 🙏

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds the ph-no-capture class to prevent capturing chat messages, which is a good privacy improvement. My review focuses on improving consistency and maintainability. I've suggested consolidating multiple class attributes into a single :class binding in ChatAssistantItem.vue and ChatUserItem.vue for better code clarity. I also noted an inconsistency in how ph-no-capture is applied in InteractiveArea.vue compared to ChatArea.vue, recommending a more robust approach by applying the class to a root container.

<BasicTextarea
v-model="messageInput"
:placeholder="t('stage.message')"
class="ph-no-capture"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

While adding ph-no-capture here works, it's inconsistent with the approach in ChatArea.vue where the class is applied to the root container. Applying ph-no-capture to the root div of this component (on line 162) would be a more robust and consistent solution, as it would cover all child elements, including the chat history and this textarea, with a single declaration. This would also make the ph-no-capture class on child components like ChatUserItem and ChatAssistantItem redundant within this context, but it's good they have it for standalone usage.


<template>
<div flex :class="containerClass">
<div flex :class="containerClass" class="ph-no-capture">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To improve code clarity and maintainability, it's better to combine the static class with the dynamic :class binding into a single array. This avoids having multiple sources for an element's classes.

<div flex :class="[containerClass, 'ph-no-capture']">


<template>
<div v-if="message.role === 'user'" :class="containerClasses">
<div v-if="message.role === 'user'" :class="containerClasses" class="ph-no-capture">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To improve code clarity and maintainability, it's better to combine the static class with the dynamic :class binding into a single array. This avoids having multiple sources for an element's classes.

<div v-if="message.role === 'user'" :class="[containerClasses, 'ph-no-capture']">

@nekomeowww nekomeowww merged commit 3dcc9a0 into main Dec 27, 2025
9 checks passed
@nekomeowww nekomeowww deleted the sr/posthog-privacy branch December 27, 2025 07:16
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.

2 participants