Skip to content

Commit c2f2eec

Browse files
Mihir-MavalankarClaude Opus 4.6
andcommitted
ref(seer): Remove node heading capitalization from this PR
Capitalization of nodeType headings in _render_node will be done in a separate PR. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
1 parent 50c1aa9 commit c2f2eec

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/sentry/seer/explorer/client_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def poll_until_done(
345345
def _render_node(node: dict[str, Any], depth: int) -> str:
346346
"""Recursively render an LLMContextSnapshot node and its children as markdown."""
347347
heading = "#" * min(depth + 1, 6)
348-
lines = [f"{heading} {node.get('nodeType', 'unknown').capitalize()}"]
348+
lines = [f"{heading} {node.get('nodeType', 'unknown')}"]
349349

350350
data = node.get("data")
351351
if isinstance(data, dict):

tests/sentry/seer/endpoints/test_organization_seer_explorer_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def test_post_json_on_page_context_converted_to_markdown(
252252
assert response.status_code == 200
253253
call_kwargs = mock_client.start_run.call_args[1]
254254
context = call_kwargs["on_page_context"]
255-
assert "# Dashboard" in context
255+
assert "# dashboard" in context
256256
assert '- **title**: "My Dashboard"' in context
257257

258258
@patch("sentry.seer.endpoints.organization_seer_explorer_chat.SeerExplorerClient")

tests/sentry/seer/explorer/test_client_utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def test_single_node(self) -> None:
200200
],
201201
}
202202
result = snapshot_to_markdown(snapshot)
203-
assert "# Dashboard" in result
203+
assert "# dashboard" in result
204204
assert '- **title**: "Backend Health"' in result
205205
assert "- **widgetCount**: 3" in result
206206

@@ -228,9 +228,9 @@ def test_nested_nodes(self) -> None:
228228
],
229229
}
230230
result = snapshot_to_markdown(snapshot)
231-
assert "# Dashboard" in result
232-
assert "## Widget" in result
233-
assert "### Chart" in result
231+
assert "# dashboard" in result
232+
assert "## widget" in result
233+
assert "### chart" in result
234234
assert '- **query**: "count()"' in result
235235

236236
def test_empty_nodes(self) -> None:
@@ -242,7 +242,7 @@ def test_node_with_no_data(self) -> None:
242242
"nodes": [{"nodeType": "dashboard", "data": None, "children": []}],
243243
}
244244
result = snapshot_to_markdown(snapshot)
245-
assert "# Dashboard" in result
245+
assert "# dashboard" in result
246246
assert "not an exact screenshot" in result
247247

248248
def test_node_with_non_dict_data(self) -> None:
@@ -251,5 +251,5 @@ def test_node_with_non_dict_data(self) -> None:
251251
"nodes": [{"nodeType": "widget", "data": "some string", "children": []}],
252252
}
253253
result = snapshot_to_markdown(snapshot)
254-
assert "# Widget" in result
254+
assert "# widget" in result
255255
assert '- "some string"' in result

0 commit comments

Comments
 (0)