Skip to main content

CHANGELOG.md

# Changelog

## v0.3.16

### Added

- Added generated `Web.Components.StarView.Layout` modules for Phoenix
  projects.
- Added a Phoenix layout guide covering `Layout.app/1` and the StarView root
  layout.
- Added the SVG icon asset to the package.

### Changed

- Updated the generated `:star_view` web-module section to alias the generated
  layout and set it as the controller root layout.
- Updated the generated search controller to render through `Layout.app/1`.
- Updated README and guide installation examples for v0.3.16.

## v0.3.15

### Changed

- Changed `mix star_view.trust` to use `mkcert` for browser-trusted development
  certificates instead of trusting Phoenix's generated self-signed leaf
  certificate directly.
- Changed the Igniter installer to print the `mix star_view.trust --host ...`
  command and mkcert install instructions instead of queueing
  `mix phx.gen.cert`.
- Updated README and guide installation examples for v0.3.15.

## v0.3.14

### Fixed

- Stopped queueing `mix star_view.trust` from the Igniter installer because
  Igniter child tasks do not reliably receive interactive stdin. The installer
  now prints the direct command to run after installation.

### Changed

- Updated README and guide installation examples for v0.3.14.

## v0.3.13

### Fixed

- Fixed the `mix star_view.trust` confirmation prompt so the `[Y/n]` options
  appear on the active input line.
- Accepted confirmation answers case-insensitively and made sudo execution more
  explicit in the task output.

### Changed

- Updated README and guide installation examples for v0.3.13.

## v0.3.12

### Added

- Added `mix star_view.trust`, an optional setup task that can add the generated
  development host to `/etc/hosts` and trust the self-signed HTTPS certificate.

### Fixed

- Fixed generated development hostnames to use DNS-safe hyphens instead of
  underscores.

### Changed

- `mix igniter.install star_view` now queues the optional trust setup after
  certificate generation and documents that the step requires sudo privileges.
- Updated README and guide installation examples for v0.3.12.

## v0.3.11

### Fixed

- Fixed `mix igniter.install star_view` so the generated `star_view` web-module
  section is inserted as a top-level sibling after `controller`, not inside the
  `controller` function body.

### Changed

- Updated README and guide installation examples for v0.3.11.

## v0.3.10

### Fixed

- Restored README and generated docs logo references to the PNG logo asset.

### Changed

- Updated README and guide installation examples for v0.3.10.

## v0.3.9

### Fixed

- Changed the generated Phoenix dispatch route to use `StarView.Dispatch` with
  `alias: false`, avoiding the noisy `Elixir.StarView.Dispatch` form while
  still preventing Phoenix scope aliasing from resolving the plug as
  `<AppWeb>.StarView.Dispatch`.

### Changed

- Updated README and guide installation examples for v0.3.9.
- Switched the README and generated docs logo reference to the SVG asset.

## v0.3.8

### Changed

- Reworked HexDocs guides into a Phoenix-style sidebar with Introduction,
  Phoenix, Core Concepts, Comparison, Reference, and Release Notes sections.

## v0.3.7

### Changed

- `mix igniter.install star_view` now inserts the generated `star_view` web
  module section immediately after the existing `controller` section when
  possible.
- Cleaned up README, guide, and module docs so setup examples consistently
  describe StarView, `:star_view`, `mix dev`, and the current router setup.
- Removed the duplicate legacy `StarView.StarView` behaviour module from the
  public API surface.

## v0.3.6

### Fixed

- Fixed generated Phoenix routes so they do not get double-prefixed inside
  aliased router scopes.
- Updated the post-install certificate instruction to include the generated
  `.test` hostname, avoiding browser TLS errors with Phoenix's default
  localhost-only dev certificate.
- `mix igniter.install star_view` now automatically queues
  `mix phx.gen.cert <otp_app>.test localhost` when HTTPS setup is enabled.

## v0.3.5

### Fixed

- Fixed the generated search controller to use `use MyAppWeb, :star_view`
  instead of the old `:starview` section name.

### Changed

- `mix igniter.install star_view` now adds a dedicated `star_view` section to
  the Phoenix web module instead of patching the existing `controller` section.
- The generated Phoenix endpoint URL now includes the HTTPS dev port
  (`https://<otp_app>.test:4001`) so `mix star_view.server` opens the actual
  listening endpoint.
- Renamed the development server task to `mix star_view.server` and added
  `mix dev` as a shortcut.

## v0.3.4

### Fixed

- Fixed `mix igniter.install star_view` with the default Phoenix example
  enabled by rendering the generated search controller template with the
  expected EEx bindings.
- Fixed the generated search controller template so it no longer nests a
  `defmodule` inside the module generated by Igniter.

## v0.3.3

### Added

- Added `mix star_view.dev`, a convenience task that starts `mix phx.server`
  with browser opening enabled. Use `--no-open` to start the server without
  opening the browser.

### Changed

- `mix igniter.install star_view` now configures the Phoenix endpoint URL for
  dev as `https://<otp_app>.test`, so Phoenix's browser-open flow lands on the
  expected local app host.
- Updated the StarView installer notice and README quick-start instructions to
  point users at `mix star_view.dev`.

## v0.3.2

### Changed

- Improved the guide documentation.

## v0.3.1

### Changed

- `StarView.mount/2` signature is `(conn, params)` — conn first argument to
  work with Phoenix's default action dispatch (`get "/", SearchController`).
- Only `handle_event/3` is optional — `mount/2` and `render/1` are now required
  callbacks on `StarView`.
- SearchController demo template extracted to `priv/templates/search_controller.ex.eex`
  for easier maintenance. The generated controller now demonstrates smart change
  detection with `maybe_patch_list/2` and `data-text` for client-side signal display.

### Added

- `guides/comparison/liveview_vs_star_view.md` — side-by-side comparison of
  StarView vs LiveView using the same active search example, including transport
  trade-offs (SSE vs WebSocket) and event payload differences (JSON vs forms).

## v0.3.0

### Changed

- **Breaking:** Renamed `StarView` callbacks for clarity and consistency with LiveView:
  - `show/2` → `mount/2` (sets up initial signals and assigns)
  - `html/1` → `render/1` (renders the HEEx template)
  - `handle_event/3` argument order changed from `(conn, event, signals)` to
    `(event, signals, conn)` to match the Phoenix LiveView convention

## v0.2.1

### Changed

- Improved the Search demo example.

## v0.2.0

### Changed

- `mix igniter.install star_view` delegates to composable setup subtasks
  instead of duplicating logic, removing ~270 lines of duplicated code.

## v0.1.2

### Fixed

- `mix igniter.install star_view` now correctly detects Phoenix projects and
  applies all patches (web module, HTTPS config, routes, demo controller).

### Changed

- Installer split into composable setup subtasks
  (`star_view.setup.streaming`, `star_view.setup.datastar`,
  `star_view.setup.web_module`, `star_view.setup.search_controller`) for
  better modularity and independent invocation.

## Unreleased

### Added

- `StarView.StreamRegistry` for opt-in per-tab SSE stream deduplication
  (ported from [dstar](https://github.com/RicoTrevisan/dstar), MIT).
- `StarView.start_stream/2` and `StarView.check_connection/1` on the facade.

### Changed

- `StarView.read_signals/1` now returns a bare signal map (like dstar); plugs
  should use `StarView.Signals.read/1` for `{:ok, map()} | {:error, term()}`.
- Removed `StarView.Actions.form/4` and Phoenix `post_form/put_form/patch_form`
  helpers in favor of the `csrf` signal + `StarView.Plug.RenameCsrfParam` flow.