-
-
Notifications
You must be signed in to change notification settings - Fork 7
metaschema tab entries chain ui #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ritabrata Ghosh <76sonali40@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 3 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="webview/src/components/MetaschemaChain.tsx">
<violation number="1" location="webview/src/components/MetaschemaChain.tsx:122">
P2: Redundant fallback - `'(root)'` will never be displayed. The outer condition `error.instanceLocation &&` ensures the value is truthy, so the `|| '(root)'` fallback inside is dead code. If you want to show '(root)' when `instanceLocation` is empty, remove the outer condition. Otherwise, remove the unused fallback.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
I think it's better but the horizontal grouping of boxes is also confusing in its own way. But I think I know how we can solve it: what if given the previous layout, instead of the arrows, we only display the top entry. And the rest is behind a "Show stack trace" accordion you can expand, and when you do so, you see the rest of the entries, but with some left margin so they are a bit indented? I think that might actually make sense |
Signed-off-by: Ritabrata Ghosh <76sonali40@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="webview/src/components/MetaschemaStackTrace.tsx">
<violation number="1" location="webview/src/components/MetaschemaStackTrace.tsx:48">
P2: The `(root)` fallback is unreachable because the block is only rendered when `instanceLocation` is truthy. If `instanceLocation` is empty/undefined, no location is shown. Render the block unconditionally (or explicitly check for null) so the fallback is displayed.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| <div className={`text-(--vscode-fg) ${size === 'primary' ? 'text-[14px] font-semibold' : 'text-[12px]'}`}> | ||
| {error.error} | ||
| </div> | ||
| {error.instanceLocation && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The (root) fallback is unreachable because the block is only rendered when instanceLocation is truthy. If instanceLocation is empty/undefined, no location is shown. Render the block unconditionally (or explicitly check for null) so the fallback is displayed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At webview/src/components/MetaschemaStackTrace.tsx, line 48:
<comment>The `(root)` fallback is unreachable because the block is only rendered when `instanceLocation` is truthy. If `instanceLocation` is empty/undefined, no location is shown. Render the block unconditionally (or explicitly check for null) so the fallback is displayed.</comment>
<file context>
@@ -0,0 +1,124 @@
+ <div className={`text-(--vscode-fg) ${size === 'primary' ? 'text-[14px] font-semibold' : 'text-[12px]'}`}>
+ {error.error}
+ </div>
+ {error.instanceLocation && (
+ <div className="mt-1 text-[11px] text-(--vscode-muted) break-all">
+ {error.instanceLocation || "(root)"}
</file context>


Related to issue #150 ->
Proof of action:
