Database-BI

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      crash occurs.

0.003.1	Wed Aug 26 04:54:25 PM EDT 2026
    [ Enhancements ]
    - Allow files to be removed from the recently opened and recently saved
      lists
    [ Bug Fixes ]
    - Drag-and-dropped files now appear in "Recently opened" under their
      original filesystem location, not the temporary .uploads/ copy.  The
      drop handler now extracts the file:// URI from the DataTransfer
      text/uri-list item (provided by desktop file managers such as Nautilus
      and Finder) and stashes it in sessionStorage before starting the
      upload.  The dashboard page then reads that stash and records the real
      path.  If no file:// URI is available (browser drag, email attachment,
      etc.), the entry is omitted entirely so a useless temp path never
    - Dragging and dropping the same file more than once no longer creates
      duplicate entries in the "Recently opened" section on the home page.
      Each upload creates a new random .uploads/<tempdir>/ subdirectory, so
      the href changed on every drop even for the same file, bypassing the
      existing href-based deduplication.  The dedup key is now normalised:
      upload entries are keyed by display name ("upload:<filename>"); all

t/function.t  view on Meta::CPAN

};

subtest 'Dashboard::_resolve_language -- garbage header falls back to default' => sub {
	my $tx = $t->ua->build_tx(GET => '/');
	$tx->req->headers->header('Accept-Language' => ';;; junk ;;;');
	my $c    = $t->app->build_controller($tx);
	my $lang = Database::BI::Controller::Dashboard::_resolve_language($c, 'web', 'en');
	is $lang, 'en', 'garbage Accept-Language header falls back to default';
};

subtest 'Dashboard::_detect_platform -- desktop UA -> web' => sub {
	my $platform = Database::BI::Controller::Dashboard::_detect_platform(
		'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', 'web');
	is $platform, 'web', 'desktop UA maps to web platform';
};

subtest 'Dashboard::_detect_platform -- mobile UA -> mobile' => sub {
	my $platform = Database::BI::Controller::Dashboard::_detect_platform(
		'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15', 'web');
	is $platform, 'mobile', 'iPhone UA maps to mobile platform';
};

subtest 'Dashboard::_detect_platform -- empty UA -> fallback' => sub {
	my $platform = Database::BI::Controller::Dashboard::_detect_platform('', 'web');

t/transaction.t  view on Meta::CPAN

		Readonly my $MOBILE_UA  => 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1';
		Readonly my $DESKTOP_UA => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36';

		# Phase 1: mobile UA — no templates/mobile/ dir, so falls back to web/en.
		$t->get_ok('/view/sales',
			{ 'User-Agent' => $MOBILE_UA })->status_is(200,
				'Phase 1: mobile UA returns 200 (falls back to web/en templates)');
		$t->content_like(qr/sales|product|region/,
			'Phase 1: data table rendered despite mobile UA');

		# Phase 2: standard desktop UA — normal web/en render.
		$t->get_ok('/view/sales',
			{ 'User-Agent' => $DESKTOP_UA })->status_is(200,
				'Phase 2: desktop UA returns 200');
		$t->content_like(qr/sales|product|region/,
			'Phase 2: data table rendered with desktop UA');

		# Phase 3: Accept-Language: fr — no templates/web/fr/, falls back to en.
		$t->get_ok('/view/sales',
			{ 'Accept-Language' => 'fr-FR,fr;q=0.9,en;q=0.8' })->status_is(200,
				'Phase 3: fr Accept-Language returns 200 (falls back to en)');
		$t->content_like(qr/sales|product|region/,
			'Phase 3: data table rendered with fr Accept-Language (en fallback)');

		# Phase 4: Accept-Language: en — standard path, no fallback needed.
		$t->get_ok('/view/sales',



( run in 2.223 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )