Compare commits

...

9 Commits

Author SHA1 Message Date
claude[bot]
2a78ab9095 fix(frontend): Revert excessive changes, keep only Text/Button unmask prop
Reverts all changes that converted h1-h6/div/span elements to Text components.
Only the core unmask prop implementation in Text.tsx, Button.tsx, and helpers.ts
is preserved. This allows static content to be unmasked in Sentry replays without
refactoring HTML elements throughout the codebase.

Co-authored-by: Nicholas Tindle <ntindle@users.noreply.github.com>
2025-12-19 16:38:20 +00:00
claude[bot]
5681924fe4 Merge branch 'dev' into copilot/unmask-static-content-replays
Resolves merge conflicts and preserves the unmask prop centralization
in Text and Button components for Sentry replay visibility.

Conflicts resolved:
- StickyNoteBlock.tsx: Merged unmask prop with dev's nodeId rename
- Button.tsx & helpers.ts: Merged unmask prop with dev's tooltip feature
- SidebarItemCard.tsx: Updated to use dev's variant with unmask prop
- AgentInfo.tsx: Merged dev's refactored layout with sentry-unmask
- AnyOfField.tsx & FieldTemplate.tsx: Added unmask=false for dynamic content

Deleted files accepted from dev:
- StandardNodeBlock.tsx, NodeDataRenderer.tsx (moved to components/)
- Multiple AgentRunsView modal components (refactored in dev)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Nicholas Tindle <ntindle@users.noreply.github.com>
2025-12-19 16:26:57 +00:00
Cursor Agent
a4c473ebbe feat: Add unmask prop to Text and Button components
This change introduces an `unmask` prop to the Text and Button components. This prop controls whether the `sentry-unmask` class is applied, allowing for better control over Sentry's error tracking for dynamic content.

Co-authored-by: nicholas.tindle <nicholas.tindle@agpt.co>
2025-12-18 18:12:40 +00:00
Nicholas Tindle
89ce133e4e Fix formatting in EmptyAgentRuns component
Adjusted line breaks and spacing for improved readability in the EmptyAgentRuns.tsx file. No functional changes were made.
2025-11-03 19:49:43 -06:00
Nicholas Tindle
faccb78c6f Merge branch 'dev' into copilot/unmask-static-content-replays 2025-11-03 17:45:57 -06:00
Nicholas Tindle
9251424576 Merge branch 'dev' into copilot/unmask-static-content-replays 2025-10-22 13:36:06 -05:00
claude[bot]
5e7b6b3da7 feat(frontend): Add sentry-unmask to additional static content
- Added sentry-unmask to login/signup page button text
- Added sentry-unmask to signup agreement text
- Added sentry-unmask to empty agent runs messages
- Ensured no PII is exposed in unmasked content

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Nicholas Tindle <ntindle@users.noreply.github.com>
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 18:33:12 +00:00
copilot-swe-agent[bot]
452fba179b Add sentry-unmask to error boundaries and key marketplace components
Co-authored-by: ntindle <8845353+ntindle@users.noreply.github.com>
2025-10-21 02:48:00 +00:00
copilot-swe-agent[bot]
5f3354230b Initial plan 2025-10-21 02:31:07 +00:00
3 changed files with 22 additions and 5 deletions

View File

@@ -20,12 +20,16 @@ export function Button(props: ButtonProps) {
rightIcon,
children,
as = "button",
unmask = true,
...restProps
} = props;
const disabled = "disabled" in props ? props.disabled : false;
const isDisabled = disabled;
const applyUnmask = (...classes: Array<string | false | null | undefined>) =>
cn(...classes, unmask && "sentry-unmask");
// Extract aria-label for tooltip on icon variant
const ariaLabel =
"aria-label" in restProps ? restProps["aria-label"] : undefined;
@@ -84,11 +88,11 @@ export function Button(props: ButtonProps) {
if (loading) {
const loadingClassName =
variant === "ghost"
? cn(
? applyUnmask(
extendedButtonVariants({ variant, size, className }),
"pointer-events-none",
)
: cn(
: applyUnmask(
extendedButtonVariants({ variant: "primary", size, className }),
"pointer-events-none border-zinc-500 bg-zinc-500 text-white",
);
@@ -120,7 +124,7 @@ export function Button(props: ButtonProps) {
const nextLinkButton = (
<NextLink
{...(restProps as LinkProps)}
className={cn(
className={applyUnmask(
extendedButtonVariants({ variant, size, className }),
loading && "pointer-events-none",
isDisabled && "pointer-events-none opacity-50",
@@ -136,7 +140,7 @@ export function Button(props: ButtonProps) {
const regularButton = (
<button
className={cn(
className={applyUnmask(
extendedButtonVariants({ variant, size, className }),
loading && "pointer-events-none",
)}

View File

@@ -50,6 +50,11 @@ type BaseButtonProps = {
rightIcon?: React.ReactNode;
asChild?: boolean;
withTooltip?: boolean;
/**
* Adds the sentry-unmask class for static button labels.
* Disable for user-provided or dynamic strings.
*/
unmask?: boolean;
} & VariantProps<typeof extendedButtonVariants>;
type ButtonAsButton = BaseButtonProps &

View File

@@ -6,6 +6,11 @@ type CustomProps = {
as?: As;
size?: Variant;
className?: string;
/**
* Adds the sentry-unmask class for static text visibility in replays.
* Disable when rendering user-provided or dynamic content.
*/
unmask?: boolean;
};
export type TextProps = React.PropsWithChildren<
@@ -18,11 +23,14 @@ export function Text({
as: outerAs,
size,
className = "",
unmask = true,
...rest
}: TextProps) {
const variantClasses = variants[size || variant] || variants.body;
const Element = outerAs || variantElementMap[variant];
const combinedClassName = `${variantClasses} ${className}`.trim();
const combinedClassName = `${variantClasses} ${
unmask ? "sentry-unmask" : ""
} ${className}`.trim();
return React.createElement(
Element,