Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ end
if config_env() == :test do
config :live_debugger,
server: true,
port: 4008
port: 4008,
unit_test?: true

config :live_debugger, update_checks?: false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ defmodule LiveDebugger.App.Debugger.CallbackTracing.Web.Components.Trace do
~H"""
<div class="flex flex-row gap-2 mt-1 text-error-text items-center">
<.icon name="icon-info" class="w-4 h-4 shrink-0" />
<p :if={@error}><%= clean_error_message(@error.message) %></p>
<p><%= clean_error_message(@error.message) %></p>
</div>
"""
end
Expand Down
8 changes: 1 addition & 7 deletions lib/live_debugger/app/debugger/streams/queries.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ defmodule LiveDebugger.App.Debugger.Streams.Queries do

alias LiveDebugger.App.Debugger.Streams.StreamUtils

require Logger

@type streams_result :: %{
functions: [function()],
config: map(),
names: [atom()]
}

@spec fetch_streams_from_render_traces(pid :: pid(), node_id :: TreeNode.id()) ::
{:ok, streams_result()} | {:error, String.t()}
{:ok, streams_result()} | :end_of_table
def fetch_streams_from_render_traces(pid, node_id) do
with {:ok, render_traces} <- fetch_render_traces(pid, node_id),
stream_traces <- StreamUtils.extract_stream_traces(render_traces),
Expand All @@ -27,10 +25,6 @@ defmodule LiveDebugger.App.Debugger.Streams.Queries do
else
:end_of_table ->
:end_of_table

error ->
Logger.error("Failed to fetch streams: #{inspect(error)}")
{:error, "Failed to fetch streams"}
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/live_debugger/app/web/components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ defmodule LiveDebugger.App.Web.Components do
attr(:variant, :string, default: "primary", values: ["primary", "secondary"])
attr(:size, :string, default: "md", values: ["md", "sm"])
attr(:class, :any, default: nil, doc: "Additional classes to add to the button.")
attr(:rest, :global, include: ~w(disabled))
attr(:rest, :global, include: ~w(disabled type))

slot(:inner_block, required: true)

Expand Down
7 changes: 3 additions & 4 deletions lib/live_debugger/env.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ defmodule LiveDebugger.Env do
def dev?(), do: false
end

if Mix.env() == :test do
def unit_test?(), do: not Application.get_env(:live_debugger, :e2e?, false)
else
def unit_test?(), do: false
def unit_test?() do
Application.get_env(:live_debugger, :unit_test?, false) and
not Application.get_env(:live_debugger, :e2e?, false)
end
end
Loading