Skip to content

Commit eeae045

Browse files
Merge branch 'main' into brendan/bitbucket-cloud-permission-syncing
2 parents 8f72ea3 + d4354cc commit eeae045

File tree

6 files changed

+42
-6
lines changed

6 files changed

+42
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Added Bitbucket Cloud OAuth identity provider support (`provider: "bitbucket-cloud"`) for SSO and account-linked permission syncing. [#924](https://github.com/sourcebot-dev/sourcebot/pull/924)
1313
- Added permission syncing support for Bitbucket Cloud. [#925](https://github.com/sourcebot-dev/sourcebot/pull/925)
1414

15+
### Changed
16+
- Hide version upgrade toast for askgithub deployment (`EXPERIMENT_ASK_GH_ENABLED`). [#931](https://github.com/sourcebot-dev/sourcebot/pull/931)
17+
18+
### Fixed
19+
- Fixed text inside angle brackets (e.g., `<id>`) being hidden in chat prompt display due to HTML parsing. [#929](https://github.com/sourcebot-dev/sourcebot/pull/929) [#932](https://github.com/sourcebot-dev/sourcebot/pull/932)
20+
1521
## [4.11.7] - 2026-02-23
1622

1723
### Changed

packages/web/src/app/[domain]/askgh/[owner]/[repo]/components/loginModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const LoginModal = ({
3737
providers={providers}
3838
callbackUrl={callbackUrl}
3939
context="login"
40-
securityNoticeClosable={true}
40+
hideSecurityNotice={true}
4141
/>
4242
</div>
4343
</DialogContent>

packages/web/src/app/[domain]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export default async function Layout(props: LayoutProps) {
201201
{children}
202202
<SyntaxReferenceGuide />
203203
<GitHubStarToast />
204-
<UpgradeToast />
204+
{env.EXPERIMENT_ASK_GH_ENABLED !== 'true' && <UpgradeToast />}
205205
</SyntaxGuideProvider>
206206
)
207207
}

packages/web/src/app/components/authMethodSelector.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ interface AuthMethodSelectorProps {
1717
context: "login" | "signup";
1818
onProviderClick?: (providerId: string) => void;
1919
securityNoticeClosable?: boolean;
20+
hideSecurityNotice?: boolean;
2021
}
2122

2223
export const AuthMethodSelector = ({
2324
providers,
2425
callbackUrl,
2526
context,
2627
onProviderClick,
27-
securityNoticeClosable = false
28+
securityNoticeClosable = false,
29+
hideSecurityNotice = false
2830
}: AuthMethodSelectorProps) => {
2931
const onSignInWithOauth = useCallback((provider: string) => {
3032
// Call the optional analytics callback first
@@ -56,7 +58,7 @@ export const AuthMethodSelector = ({
5658

5759
return (
5860
<>
59-
<AuthSecurityNotice closable={securityNoticeClosable} />
61+
{!hideSecurityNotice && <AuthSecurityNotice closable={securityNoticeClosable} />}
6062
<DividerSet
6163
elements={[
6264
...(oauthProviders.length > 0 ? [

packages/web/src/features/chat/components/chatThread/chatThreadListItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ const ChatThreadListItemComponent = forwardRef<HTMLDivElement, ChatThreadListIte
334334
<MarkdownRenderer
335335
content={userQuestion.trim()}
336336
className="prose-p:m-0"
337+
escapeHtml={true}
337338
/>
338339
</div>
339340

packages/web/src/features/chat/components/chatThread/markdownRenderer.tsx

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,27 @@ function remarkReferencesPlugin() {
8080
}
8181
}
8282

83+
/**
84+
* A remark plugin that converts `html` MDAST nodes into `text` nodes,
85+
* preserving angle-bracketed content like `<id>` as visible text. Without this,
86+
* `<id>` is parsed as an HTML tag and then stripped by sanitization.
87+
*
88+
* This plugin must run BEFORE remarkReferencesPlugin so that the file-reference
89+
* HTML nodes created by that plugin are left intact for rehypeRaw to process.
90+
*/
91+
function remarkPreserveHtml() {
92+
return function (tree: Nodes) {
93+
visit(tree, 'html', (node, index, parent) => {
94+
if (index !== undefined && parent && 'children' in parent) {
95+
(parent.children as Nodes[])[index] = {
96+
type: 'text',
97+
value: (node as { value: string }).value,
98+
};
99+
}
100+
});
101+
};
102+
}
103+
83104
const remarkTocExtractor = () => {
84105
return function (tree: Nodes) {
85106
visit(tree, 'heading', (node: Heading) => {
@@ -101,18 +122,24 @@ const remarkTocExtractor = () => {
101122
interface MarkdownRendererProps {
102123
content: string;
103124
className?: string;
125+
/**
126+
* When true, angle-bracketed text like `<id>` is preserved as visible text
127+
* instead of being parsed as HTML. File references (@file:{...}) are unaffected.
128+
*/
129+
escapeHtml?: boolean;
104130
}
105131

106-
const MarkdownRendererComponent = forwardRef<HTMLDivElement, MarkdownRendererProps>(({ content, className }, ref) => {
132+
const MarkdownRendererComponent = forwardRef<HTMLDivElement, MarkdownRendererProps>(({ content, className, escapeHtml = false }, ref) => {
107133
const router = useRouter();
108134

109135
const remarkPlugins = useMemo((): PluggableList => {
110136
return [
111137
remarkGfm,
138+
...(escapeHtml ? [remarkPreserveHtml] : []),
112139
remarkReferencesPlugin,
113140
remarkTocExtractor,
114141
];
115-
}, []);
142+
}, [escapeHtml]);
116143

117144
const rehypePlugins = useMemo((): PluggableList => {
118145
return [

0 commit comments

Comments
 (0)